static gboolean
apply_changes_gradually (gpointer data)
{
- gdouble fraction;
+ double fraction;
/* Work, work, work... */
fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progress_bar));
/* Draw a rectangle on the screen */
static void
draw_brush (GtkWidget *widget,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GdkRectangle update_rect;
cairo_t *cr;
entry_activated (GtkEntry *entry,
GtkAdjustment *adjustment)
{
- gdouble value;
+ double value;
char *err = NULL;
value = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err);
{
Axis *axis;
Axis akey;
- gdouble value;
+ double value;
value = coords[ai[i].axis_index];
int *x,
int *y)
{
- gdouble u, v;
+ double u, v;
int width, height;
width = gtk_widget_get_allocated_width (GTK_WIDGET (plane));
int y)
{
GtkWidget *widget = GTK_WIDGET (plane);
- gdouble u, v;
+ double u, v;
u = CLAMP (x * (1.0 / gtk_widget_get_allocated_width (widget)), 0, 1);
v = CLAMP (1 - y * (1.0 / gtk_widget_get_allocated_height (widget)), 0, 1);
static void
plane_drag_gesture_begin (GtkGestureDrag *gesture,
- gdouble start_x,
- gdouble start_y,
+ double start_x,
+ double start_y,
GtkFontPlane *plane)
{
guint button;
static void
plane_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkFontPlane *plane)
{
- gdouble start_x, start_y;
+ double start_x, start_y;
gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture),
&start_x, &start_y);
static void
plane_drag_gesture_end (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkFontPlane *plane)
{
set_cross_cursor (GTK_WIDGET (plane), FALSE);
static GtkGesture *rotate = NULL;
static GtkGesture *zoom = NULL;
-static gdouble swipe_x = 0;
-static gdouble swipe_y = 0;
+static double swipe_x = 0;
+static double swipe_y = 0;
static gboolean long_pressed = FALSE;
static gboolean
static void
swipe_gesture_swept (GtkGestureSwipe *gesture,
- gdouble velocity_x,
- gdouble velocity_y,
+ double velocity_x,
+ double velocity_y,
GtkWidget *widget)
{
swipe_x = velocity_x / 10;
static void
long_press_gesture_pressed (GtkGestureLongPress *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkWidget *widget)
{
long_pressed = TRUE;
static void
rotation_angle_changed (GtkGestureRotate *gesture,
- gdouble angle,
- gdouble delta,
+ double angle,
+ double delta,
GtkWidget *widget)
{
gtk_widget_queue_draw (widget);
static void
zoom_scale_changed (GtkGestureZoom *gesture,
- gdouble scale,
+ double scale,
GtkWidget *widget)
{
gtk_widget_queue_draw (widget);
{
cairo_pattern_t *pat;
cairo_matrix_t matrix;
- gdouble angle, scale;
- gdouble x_center, y_center;
+ double angle, scale;
+ double x_center, y_center;
gtk_gesture_get_bounding_box_center (GTK_GESTURE (zoom), &x_center, &y_center);
static void
released_cb (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkWidget *text_view)
{
GtkTextIter start, end, iter;
static void
motion_cb (GtkEventControllerMotion *controller,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkTextView *text_view)
{
set_cursor_if_appropriate (text_view, x, y);
static void
rgb_to_hsv (GdkRGBA *rgba,
- gdouble *h_out,
- gdouble *s_out,
- gdouble *v_out)
+ double *h_out,
+ double *s_out,
+ double *v_out)
{
- gdouble red, green, blue;
- gdouble h, s, v;
- gdouble min, max;
- gdouble delta;
+ double red, green, blue;
+ double h, s, v;
+ double min, max;
+ double delta;
red = rgba->red;
green = rgba->green;
"gshort",
"gushort",
"gulong",
- "gdouble",
- "gldouble",
"gpointer",
"NULL",
"GList",
cairo_t *cr;
GdkRGBA draw_color;
GtkPadController *pad_controller;
- gdouble brush_size;
+ double brush_size;
} DrawingArea;
typedef struct
GVariant *parameter,
DrawingArea *area)
{
- gdouble value = g_variant_get_double (parameter);
+ double value = g_variant_get_double (parameter);
area->brush_size = value;
}
static void
drawing_area_apply_stroke (DrawingArea *area,
GdkDeviceTool *tool,
- gdouble x,
- gdouble y,
- gdouble pressure)
+ double x,
+ double y,
+ double pressure)
{
if (gdk_device_tool_get_tool_type (tool) == GDK_DEVICE_TOOL_TYPE_ERASER)
{
static void
stylus_gesture_down (GtkGestureStylus *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
DrawingArea *area)
{
cairo_new_path (area->cr);
static void
stylus_gesture_motion (GtkGestureStylus *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
DrawingArea *area)
{
GdkTimeCoord *backlog;
GdkDeviceTool *tool;
- gdouble pressure;
+ double pressure;
guint n_items;
tool = gtk_gesture_stylus_get_device_tool (gesture);
typedef struct
{
char *resourcename;
- gdouble font_size;
+ double font_size;
int lines_per_page;
char **lines;
cairo_t *cr;
PangoLayout *layout;
int text_width, text_height;
- gdouble width;
+ double width;
int line, i;
PangoFontDescription *desc;
char *page_str;
int
spinbutton_hex_spin_input (GtkSpinButton *spin_button,
- gdouble *new_val)
+ double *new_val)
{
const char *buf;
char *err;
- gdouble res;
+ double res;
buf = gtk_editable_get_text (GTK_EDITABLE (spin_button));
res = strtol (buf, &err, 16);
{
GtkAdjustment *adjustment;
char *buf;
- gdouble val;
+ double val;
adjustment = gtk_spin_button_get_adjustment (spin_button);
val = gtk_adjustment_get_value (adjustment);
int
spinbutton_time_spin_input (GtkSpinButton *spin_button,
- gdouble *new_val)
+ double *new_val)
{
const char *text;
char **str;
{
GtkAdjustment *adjustment;
char *buf;
- gdouble hours;
- gdouble minutes;
+ double hours;
+ double minutes;
adjustment = gtk_spin_button_get_adjustment (spin_button);
hours = gtk_adjustment_get_value (adjustment) / 60.0;
int
spinbutton_month_spin_input (GtkSpinButton *spin_button,
- gdouble *new_val)
+ double *new_val)
{
int i;
char *tmp1, *tmp2;
*new_val = 0.0;
return GTK_INPUT_ERROR;
}
- *new_val = (gdouble) i;
+ *new_val = (double) i;
return TRUE;
}
spinbutton_month_spin_output (GtkSpinButton *spin_button)
{
GtkAdjustment *adjustment;
- gdouble value;
+ double value;
int i;
adjustment = gtk_spin_button_get_adjustment (spin_button);
static void
update_pulse_time (GtkAdjustment *adjustment, GtkWidget *widget)
{
- gdouble value;
+ double value;
guint pulse_id;
value = gtk_adjustment_get_value (adjustment);
static void
on_scale_button_value_changed (GtkScaleButton *button,
- gdouble value,
+ double value,
gpointer user_data)
{
GtkAdjustment *adjustment;
- gdouble val;
+ double val;
char *str;
adjustment = gtk_scale_button_get_adjustment (button);
/* Draw a rectangle on the surface at the given position */
static void
draw_brush (GtkWidget *widget,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
cairo_t *cr;
/* Draw a rectangle on the surface at the given position */
static void
draw_brush (GtkWidget *widget,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
cairo_t *cr;
#include "gdkprivate-broadway.h"
static void gdk_broadway_device_get_state (GdkDevice *device,
- GdkSurface *surface,
- gdouble *axes,
+ GdkSurface *surface,
+ double *axes,
GdkModifierType *mask);
static void gdk_broadway_device_set_surface_cursor (GdkDevice *device,
GdkSurface *surface,
static void gdk_broadway_device_ungrab (GdkDevice *device,
guint32 time_);
static GdkSurface * gdk_broadway_device_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask);
static void
gdk_broadway_device_get_state (GdkDevice *device,
- GdkSurface *surface,
- gdouble *axes,
+ GdkSurface *surface,
+ double *axes,
GdkModifierType *mask)
{
- gdouble x, y;
+ double x, y;
gdk_surface_get_device_position (surface, device, &x, &y, mask);
static GdkSurface *
gdk_broadway_device_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask)
{
GdkSurface *surface = NULL;
static gboolean
gdk_broadway_surface_get_device_state (GdkSurface *surface,
GdkDevice *device,
- gdouble *x,
- gdouble *y,
+ double *x,
+ double *y,
GdkModifierType *mask)
{
GdkSurface *child;
void
gdk_cairo_set_source_pixbuf (cairo_t *cr,
const GdkPixbuf *pixbuf,
- gdouble pixbuf_x,
- gdouble pixbuf_y)
+ double pixbuf_x,
+ double pixbuf_y)
{
cairo_format_t format;
cairo_surface_t *surface;
GDK_AVAILABLE_IN_ALL
void gdk_cairo_set_source_pixbuf (cairo_t *cr,
const GdkPixbuf *pixbuf,
- gdouble pixbuf_x,
- gdouble pixbuf_y);
+ double pixbuf_x,
+ double pixbuf_y);
GDK_AVAILABLE_IN_ALL
void gdk_cairo_rectangle (cairo_t *cr,
struct _GdkAxisInfo
{
GdkAxisUse use;
- gdouble min_axis;
- gdouble max_axis;
- gdouble min_value;
- gdouble max_value;
- gdouble resolution;
+ double min_axis;
+ double max_axis;
+ double min_value;
+ double max_value;
+ double resolution;
};
enum {
void
gdk_device_get_state (GdkDevice *device,
GdkSurface *surface,
- gdouble *axes,
+ double *axes,
GdkModifierType *mask)
{
g_return_if_fail (GDK_IS_DEVICE (device));
double *win_x,
double *win_y)
{
- gdouble tmp_x, tmp_y;
+ double tmp_x, tmp_y;
GdkSurface *surface;
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
**/
gboolean
gdk_device_get_axis (GdkDevice *device,
- gdouble *axes,
+ double *axes,
GdkAxisUse use,
- gdouble *value)
+ double *value)
{
int i;
guint
_gdk_device_add_axis (GdkDevice *device,
GdkAxisUse use,
- gdouble min_value,
- gdouble max_value,
- gdouble resolution)
+ double min_value,
+ double max_value,
+ double resolution)
{
GdkAxisInfo axis_info;
guint pos;
_gdk_device_get_axis_info (GdkDevice *device,
guint index_,
GdkAxisUse *use,
- gdouble *min_value,
- gdouble *max_value,
- gdouble *resolution)
+ double *min_value,
+ double *max_value,
+ double *resolution)
{
GdkAxisInfo *info;
_gdk_device_translate_surface_coord (GdkDevice *device,
GdkSurface *surface,
guint index_,
- gdouble value,
- gdouble *axis_value)
+ double value,
+ double *axis_value)
{
GdkAxisInfo axis_info;
GdkAxisInfo *axis_info_x, *axis_info_y;
- gdouble device_width, device_height;
- gdouble x_offset, y_offset;
- gdouble x_scale, y_scale;
- gdouble x_min, y_min;
- gdouble x_resolution, y_resolution;
- gdouble device_aspect;
+ double device_width, device_height;
+ double x_offset, y_offset;
+ double x_scale, y_scale;
+ double x_min, y_min;
+ double x_resolution, y_resolution;
+ double device_aspect;
int surface_width, surface_height;
if (index_ >= device->axes->len)
gboolean
_gdk_device_translate_screen_coord (GdkDevice *device,
GdkSurface *surface,
- gdouble surface_root_x,
- gdouble surface_root_y,
- gdouble screen_width,
- gdouble screen_height,
+ double surface_root_x,
+ double surface_root_y,
+ double screen_width,
+ double screen_height,
guint index_,
- gdouble value,
- gdouble *axis_value)
+ double value,
+ double *axis_value)
{
GdkAxisInfo axis_info;
- gdouble axis_width, scale, offset;
+ double axis_width, scale, offset;
if (index_ >= device->axes->len)
return FALSE;
gboolean
_gdk_device_translate_axis (GdkDevice *device,
guint index_,
- gdouble value,
- gdouble *axis_value)
+ double value,
+ double *axis_value)
{
GdkAxisInfo axis_info;
- gdouble axis_width, out;
+ double axis_width, out;
if (index_ >= device->axes->len)
return FALSE;
_gdk_device_query_state (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask)
{
GDK_DEVICE_GET_CLASS (device)->query_state (device,
GdkSurface *
_gdk_device_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask)
{
return GDK_DEVICE_GET_CLASS (device)->surface_at_position (device,
GDK_AVAILABLE_IN_ALL
void gdk_device_get_state (GdkDevice *device,
GdkSurface *surface,
- gdouble *axes,
+ double *axes,
GdkModifierType *mask);
GDK_AVAILABLE_IN_ALL
GdkSurface * gdk_device_get_surface_at_position (GdkDevice *device,
int gdk_device_get_n_axes (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
gboolean gdk_device_get_axis (GdkDevice *device,
- gdouble *axes,
+ double *axes,
GdkAxisUse use,
- gdouble *value);
+ double *value);
GDK_AVAILABLE_IN_ALL
GdkDisplay * gdk_device_get_display (GdkDevice *device);
void (* get_state) (GdkDevice *device,
GdkSurface *surface,
- gdouble *axes,
+ double *axes,
GdkModifierType *mask);
void (* set_surface_cursor)(GdkDevice *device,
void (* query_state) (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask);
GdkGrabStatus (* grab) (GdkDevice *device,
GdkSurface *surface,
void _gdk_device_reset_axes (GdkDevice *device);
guint _gdk_device_add_axis (GdkDevice *device,
GdkAxisUse use,
- gdouble min_value,
- gdouble max_value,
- gdouble resolution);
+ double min_value,
+ double max_value,
+ double resolution);
void _gdk_device_get_axis_info (GdkDevice *device,
guint index,
GdkAxisUse *use,
- gdouble *min_value,
- gdouble *max_value,
- gdouble *resolution);
+ double *min_value,
+ double *max_value,
+ double *resolution);
gboolean _gdk_device_translate_surface_coord (GdkDevice *device,
GdkSurface *surface,
guint index,
- gdouble value,
- gdouble *axis_value);
+ double value,
+ double *axis_value);
gboolean _gdk_device_translate_screen_coord (GdkDevice *device,
GdkSurface *surface,
- gdouble surface_root_x,
- gdouble surface_root_y,
- gdouble screen_width,
- gdouble screen_height,
+ double surface_root_x,
+ double surface_root_y,
+ double screen_width,
+ double screen_height,
guint index,
- gdouble value,
- gdouble *axis_value);
+ double value,
+ double *axis_value);
gboolean _gdk_device_translate_axis (GdkDevice *device,
guint index,
- gdouble value,
- gdouble *axis_value);
+ double value,
+ double *axis_value);
GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device,
int n_events);
void _gdk_device_query_state (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask);
GdkSurface * _gdk_device_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask);
void gdk_device_set_seat (GdkDevice *device,
GdkModifierType *state_out)
{
GdkSurface *pointer_surface;
- gdouble x, y;
+ double x, y;
GdkModifierType state;
pointer_surface = _gdk_device_surface_at_position (device, &x, &y, &state);
typedef struct
{
GdkSurface *surface_under_pointer; /* surface that last got a normal enter event */
- gdouble toplevel_x, toplevel_y;
+ double toplevel_x, toplevel_y;
guint32 state;
guint32 button;
GdkDevice *last_physical_device;
static gboolean
gdk_events_get_axis_distances (GdkEvent *event1,
GdkEvent *event2,
- gdouble *x_distance,
- gdouble *y_distance,
- gdouble *distance)
+ double *x_distance,
+ double *y_distance,
+ double *distance)
{
- gdouble x1, x2, y1, y2;
- gdouble xd, yd;
+ double x1, x2, y1, y2;
+ double xd, yd;
if (!gdk_event_get_position (event1, &x1, &y1) ||
!gdk_event_get_position (event2, &x2, &y2))
gboolean
gdk_events_get_distance (GdkEvent *event1,
GdkEvent *event2,
- gdouble *distance)
+ double *distance)
{
return gdk_events_get_axis_distances (event1, event2,
NULL, NULL,
gboolean
gdk_events_get_angle (GdkEvent *event1,
GdkEvent *event2,
- gdouble *angle)
+ double *angle)
{
- gdouble x_distance, y_distance, distance;
+ double x_distance, y_distance, distance;
if (!gdk_events_get_axis_distances (event1, event2,
&x_distance, &y_distance,
gboolean
gdk_events_get_center (GdkEvent *event1,
GdkEvent *event2,
- gdouble *x,
- gdouble *y)
+ double *x,
+ double *y)
{
- gdouble x1, x2, y1, y2;
+ double x1, x2, y1, y2;
if (!gdk_event_get_position (event1, &x1, &y1) ||
!gdk_event_get_position (event2, &x2, &y2))
GdkDevice *device,
GdkDevice *source_device,
GdkCrossingMode mode,
- gdouble toplevel_x,
- gdouble toplevel_y,
+ double toplevel_x,
+ double toplevel_y,
GdkModifierType mask,
guint32 time_,
GdkEvent *event_in_queue,
int base_height;
int width_inc;
int height_inc;
- gdouble min_aspect;
- gdouble max_aspect;
+ double min_aspect;
+ double max_aspect;
GdkGravity win_gravity;
};
static gboolean
parse_rgb_value (const char *str,
char **endp,
- gdouble *number)
+ double *number)
{
const char *p;
const char *spec)
{
gboolean has_alpha;
- gdouble r, g, b, a;
+ double r, g, b, a;
char *str = (char *) spec;
char *p;
double *y,
GdkModifierType *mask)
{
- gdouble tmp_x, tmp_y;
+ double tmp_x, tmp_y;
GdkModifierType tmp_mask;
g_return_if_fail (GDK_IS_SURFACE (surface));
int *root_y);
gboolean (* get_device_state) (GdkSurface *surface,
GdkDevice *device,
- gdouble *x,
- gdouble *y,
+ double *x,
+ double *y,
GdkModifierType *mask);
void (* set_input_region) (GdkSurface *surface,
static GdkSurface *
gdk_macos_device_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *state)
{
GdkMacosDisplay *display;
static void
gdk_macos_device_get_state (GdkDevice *device,
GdkSurface *surface,
- gdouble *axes,
+ double *axes,
GdkModifierType *mask)
{
- gdouble x_pos, y_pos;
+ double x_pos, y_pos;
g_assert (GDK_IS_MACOS_DEVICE (device));
g_assert (GDK_IS_MACOS_SURFACE (surface));
gdk_macos_device_query_state (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask)
{
GdkDisplay *display;
} last_state = FP_STATE_IDLE;
GdkSeat *seat;
GdkTouchpadGesturePhase phase;
- gdouble angle_delta = 0.0;
+ double angle_delta = 0.0;
g_assert (GDK_IS_MACOS_DISPLAY (display));
g_assert (GDK_IS_MACOS_SURFACE (surface));
GdkDevice *pointer;
GdkEvent *ret = NULL;
GdkSeat *seat;
- gdouble dx;
- gdouble dy;
+ double dx;
+ double dy;
g_assert (GDK_IS_MACOS_SURFACE (surface));
g_assert (nsevent != NULL);
if ([nsevent hasPreciseScrollingDeltas])
{
- gdouble sx;
- gdouble sy;
+ double sx;
+ double sy;
/*
* TODO: We probably need another event type for the
static void
gdk_drag_update (GdkDrag *drag,
- gdouble x_root,
- gdouble y_root,
+ double x_root,
+ double y_root,
GdkModifierType mods,
guint32 evtime)
{
static gboolean
gdk_macos_surface_get_device_state (GdkSurface *surface,
GdkDevice *device,
- gdouble *x,
- gdouble *y,
+ double *x,
+ double *y,
GdkModifierType *mask)
{
GdkDisplay *display;
struct _GdkWaylandTouchData
{
uint32_t id;
- gdouble x;
- gdouble y;
+ double x;
+ double y;
GdkSurface *surface;
uint32_t touch_down_serial;
guint initial_touch : 1;
GdkEvent *event;
/* Specific to the scroll event */
- gdouble delta_x, delta_y;
+ double delta_x, delta_y;
int32_t discrete_x, discrete_y;
gint8 is_scroll_stop;
enum wl_pointer_axis_source source;
struct {
guint source;
gboolean is_stop;
- gdouble value;
+ double value;
} axis_tmp_info;
};
GdkWaylandTabletToolData *current_tool;
int axis_indices[GDK_AXIS_LAST];
- gdouble *axes;
+ double *axes;
};
struct _GdkWaylandSeat
/* Some tracking on gesture events */
guint gesture_n_fingers;
- gdouble gesture_scale;
+ double gesture_scale;
GdkCursor *grab_cursor;
};
static void
gdk_wayland_device_get_state (GdkDevice *device,
GdkSurface *surface,
- gdouble *axes,
+ double *axes,
GdkModifierType *mask)
{
- gdouble x, y;
+ double x, y;
gdk_surface_get_device_position (surface, device, &x, &y, mask);
gdk_wayland_device_query_state (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask)
{
GdkWaylandPointerData *pointer;
static GdkSurface *
gdk_wayland_device_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask)
{
GdkWaylandPointerData *pointer;
static void
flush_smooth_scroll_event (GdkWaylandSeat *seat,
- gdouble delta_x,
- gdouble delta_y,
+ double delta_x,
+ double delta_y,
gboolean is_stop)
{
GdkEvent *event;
GdkTouchpadGesturePhase phase,
guint32 _time,
guint32 n_fingers,
- gdouble dx,
- gdouble dy)
+ double dx,
+ double dy)
{
GdkEvent *event;
GdkTouchpadGesturePhase phase,
guint32 _time,
guint n_fingers,
- gdouble dx,
- gdouble dy,
- gdouble scale,
- gdouble angle_delta)
+ double dx,
+ double dy,
+ double scale,
+ double angle_delta)
{
GdkEvent *event;
g_free (tablet->axes);
tablet->axes =
- g_new0 (gdouble, gdk_device_get_n_axes (tablet->stylus_device));
+ g_new0 (double, gdk_device_get_n_axes (tablet->stylus_device));
g_object_thaw_notify (G_OBJECT (tablet->stylus_device));
}
gdk_wayland_mimic_device_axes (GdkDevice *logical,
GdkDevice *physical)
{
- gdouble axis_min, axis_max, axis_resolution;
+ double axis_min, axis_max, axis_resolution;
GdkAxisUse axis_use;
int axis_count;
int i;
tablet_copy_axes (GdkWaylandTabletData *tablet)
{
return g_memdup (tablet->axes,
- sizeof (gdouble) * gdk_device_get_n_axes (tablet->stylus_device));
+ sizeof (double) * gdk_device_get_n_axes (tablet->stylus_device));
}
static void
g_message ("tablet pad strip handle position, strip = %p position = %d",
wp_tablet_pad_strip, position));
- group->axis_tmp_info.value = (gdouble) position / 65535;
+ group->axis_tmp_info.value = (double) position / 65535;
}
static void
return 0;
}
-static gdouble
+static double
get_dpi_from_gsettings (GdkWaylandDisplay *display_wayland)
{
GSettings *settings;
- gdouble factor;
+ double factor;
settings = g_hash_table_lookup (display_wayland->settings,
"org.gnome.desktop.interface");
static gboolean
gdk_wayland_surface_get_device_state (GdkSurface *surface,
GdkDevice *device,
- gdouble *x,
- gdouble *y,
+ double *x,
+ double *y,
GdkModifierType *mask)
{
gboolean return_val;
{
if (p[3] != 0)
{
- gdouble inverse_alpha = 255./p[3];
+ double inverse_alpha = 255./p[3];
p[0] = p[0] * inverse_alpha + 0.5;
p[1] = p[1] * inverse_alpha + 0.5;
GdkPixbuf *
gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon,
- gdouble *x_hot,
- gdouble *y_hot)
+ double *x_hot,
+ double *y_hot)
{
GdkPixbuf *pixbuf = NULL;
ICONINFO ii;
GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device);
int n_axes, i;
GdkAxisUse use;
- gdouble min_value, max_value, resolution;
+ double min_value, max_value, resolution;
if (virtual->active_device == new_active)
return;
static void
gdk_device_virtual_get_state (GdkDevice *device,
GdkSurface *window,
- gdouble *axes,
+ double *axes,
GdkModifierType *mask)
{
GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device);
gdk_device_virtual_query_state (GdkDevice *device,
GdkSurface *window,
GdkSurface **child_window,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask)
{
GdkDeviceVirtual *virtual = GDK_DEVICE_VIRTUAL (device);
static void
gdk_device_win32_get_state (GdkDevice *device,
GdkSurface *window,
- gdouble *axes,
+ double *axes,
GdkModifierType *mask)
{
double x, y;
GdkSurface *
_gdk_device_win32_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask)
{
GdkSurface *window = NULL;
GType gdk_device_win32_get_type (void) G_GNUC_CONST;
GdkSurface *_gdk_device_win32_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask);
G_END_DECLS
static void
gdk_device_wintab_get_state (GdkDevice *device,
GdkSurface *window,
- gdouble *axes,
+ double *axes,
GdkModifierType *mask)
{
GdkDeviceWintab *device_wintab;
static GdkSurface *
gdk_device_wintab_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask)
{
return NULL;
void
_gdk_device_wintab_translate_axes (GdkDeviceWintab *device_wintab,
GdkSurface *window,
- gdouble *axes,
- gdouble *x,
- gdouble *y)
+ double *axes,
+ double *x,
+ double *y)
{
GdkDevice *device;
GdkSurface *impl_surface;
int root_x, root_y;
- gdouble temp_x, temp_y;
+ double temp_x, temp_y;
int i;
device = GDK_DEVICE (device_wintab);
void _gdk_device_wintab_translate_axes (GdkDeviceWintab *device,
GdkSurface *window,
- gdouble *axes,
- gdouble *x,
- gdouble *y);
+ double *axes,
+ double *x,
+ double *y);
G_END_DECLS
if (event_type == GDK_BUTTON_PRESS ||
event_type == GDK_BUTTON_RELEASE)
{
- axes = g_new (gdouble, num_axes);
+ axes = g_new (double, num_axes);
_gdk_device_wintab_translate_axes (source_device,
window,
}
else
{
- axes = g_new (gdouble, num_axes);
+ axes = g_new (double, num_axes);
_gdk_device_wintab_translate_axes (source_device,
window,
axes,
static void
gdk_local_drag_update (GdkDrag *drag,
- gdouble x_root,
- gdouble y_root,
+ double x_root,
+ double y_root,
DWORD grfKeyState,
guint32 evtime)
{
delta_x = delta_y = 0.0;
if (msg->message == WM_MOUSEWHEEL)
- delta_y = (double) GET_WHEEL_DELTA_WPARAM (msg->wParam) / (gdouble) WHEEL_DELTA;
+ delta_y = (double) GET_WHEEL_DELTA_WPARAM (msg->wParam) / (double) WHEEL_DELTA;
else if (msg->message == WM_MOUSEHWHEEL)
- delta_x = (double) GET_WHEEL_DELTA_WPARAM (msg->wParam) / (gdouble) WHEEL_DELTA;
+ delta_x = (double) GET_WHEEL_DELTA_WPARAM (msg->wParam) / (double) WHEEL_DELTA;
/* Positive delta scrolls up, not down,
see API documentation for WM_MOUSEWHEEL message.
*/
RECT decorated_rect;
RECT undecorated_drag;
int decoration_width, decoration_height;
- gdouble drag_aspect;
+ double drag_aspect;
int drag_width, drag_height, new_width, new_height;
GetClientRect (GDK_SURFACE_HWND (window), &rect);
drag_width = undecorated_drag.right - undecorated_drag.left;
drag_height = undecorated_drag.bottom - undecorated_drag.top;
- drag_aspect = (gdouble) drag_width / drag_height;
+ drag_aspect = (double) drag_width / drag_height;
GDK_NOTE (EVENTS, g_print (" (ASPECT:%g--%g curr: %g)",
impl->hints.min_aspect, impl->hints.max_aspect, drag_aspect));
if (SUCCEEDED (hr))
{
- timings->refresh_interval = timing_info.qpcRefreshPeriod * (gdouble)G_USEC_PER_SEC / tick_frequency.QuadPart;
- timings->presentation_time = timing_info.qpcCompose * (gdouble)G_USEC_PER_SEC / tick_frequency.QuadPart;
+ timings->refresh_interval = timing_info.qpcRefreshPeriod * (double)G_USEC_PER_SEC / tick_frequency.QuadPart;
+ timings->presentation_time = timing_info.qpcCompose * (double)G_USEC_PER_SEC / tick_frequency.QuadPart;
}
}
static gboolean
gdk_surface_win32_get_device_state (GdkSurface *window,
GdkDevice *device,
- gdouble *x,
- gdouble *y,
+ double *x,
+ double *y,
GdkModifierType *mask)
{
GdkSurface *child;
/* If the window fits into new work area without resizing it,
* place it into new work area without resizing it.
*/
- gdouble left, right, up, down, hratio, vratio;
- gdouble hscale, vscale;
- gdouble new_left, new_up;
+ double left, right, up, down, hratio, vratio;
+ double hscale, vscale;
+ double new_left, new_up;
left = impl->snap_stash->x;
right = 1.0 - (impl->snap_stash->x + impl->snap_stash->width);
hscale = hratio / (1.0 + hratio);
}
- new_left = (gdouble) (rect.width - impl->snap_stash_int->width) * hscale;
+ new_left = (double) (rect.width - impl->snap_stash_int->width) * hscale;
vscale = 1.0;
vscale = vratio / (1.0 + vratio);
}
- new_up = (gdouble) (rect.height - impl->snap_stash_int->height) * vscale;
+ new_up = (double) (rect.height - impl->snap_stash_int->height) * vscale;
rect.x = round (rect.x + new_left);
rect.y = round (rect.y + new_up);
wwidth = (hmonitor_info.rcWork.right - hmonitor_info.rcWork.left) / impl->surface_scale;
wheight = (hmonitor_info.rcWork.bottom - hmonitor_info.rcWork.top) / impl->surface_scale;
- impl->snap_stash->x = (gdouble) (x) / (gdouble) (wwidth);
- impl->snap_stash->y = (gdouble) (y) / (gdouble) (wheight);
- impl->snap_stash->width = (gdouble) width / (gdouble) (wwidth);
- impl->snap_stash->height = (gdouble) height / (gdouble) (wheight);
+ impl->snap_stash->x = (double) (x) / (double) (wwidth);
+ impl->snap_stash->y = (double) (y) / (double) (wheight);
+ impl->snap_stash->width = (double) width / (double) (wwidth);
+ impl->snap_stash->height = (double) height / (double) (wheight);
impl->snap_stash_int->x = x;
impl->snap_stash_int->y = y;
adjust_indicator_rectangle (GdkRectangle *rect,
gboolean inward)
{
- gdouble inverter;
+ double inverter;
const int gap = AEROSNAP_INDICATOR_EDGE_GAP;
#if defined(MORE_AEROSNAP_DEBUGGING)
GdkRectangle cache = *rect;
int y,
int width,
int height,
- gdouble radius,
- gdouble line_width,
+ double radius,
+ double line_width,
GdkRGBA *fill,
GdkRGBA *outline)
{
- gdouble degrees = M_PI / 180.0;
+ double degrees = M_PI / 180.0;
if (fill == NULL && outline == NULL)
return;
}
/* Translates linear animation scale into some kind of curve */
-static gdouble
-curve (gdouble val)
+static double
+curve (double val)
{
/* TODO: try different curves. For now it's just linear */
return val;
GdkRGBA fill = {0, 0, 1.0, 0.8};
GdkRectangle current_rect;
gint64 current_time = g_get_monotonic_time ();
- gdouble animation_progress;
+ double animation_progress;
gboolean last_draw;
- gdouble line_width;
- gdouble corner_radius;
+ double line_width;
+ double corner_radius;
gint64 animation_duration;
GdkWin32Surface *impl = GDK_WIN32_SURFACE (context->window);
if (timestamp != 0)
current_time = timestamp;
- animation_progress = (gdouble) (current_time - context->indicator_start_time) / animation_duration;
+ animation_progress = (double) (current_time - context->indicator_start_time) / animation_duration;
if (animation_progress > 1.0)
animation_progress = 1.0;
HDC hdc;
POINT source_point = { 0, 0 };
gboolean last_draw;
- gdouble indicator_opacity;
+ double indicator_opacity;
GdkWin32Surface *impl;
gboolean do_source_remove = FALSE;
struct _GdkRectangleDouble
{
- gdouble x;
- gdouble y;
- gdouble width;
- gdouble height;
+ double x;
+ double y;
+ double width;
+ double height;
};
typedef struct _GdkRectangleDouble GdkRectangleDouble;
* we remember the opacity value here and apply it
* during UpdateLayredWindow() call, for layered windows.
*/
- gdouble layered_opacity;
+ double layered_opacity;
HDC hdc;
int hdc_count;
/* For internal GTK use only */
GDK_AVAILABLE_IN_ALL
GdkPixbuf *gdk_win32_icon_to_pixbuf_libgtk_only (HICON hicon,
- gdouble *x_hot,
- gdouble *y_hot);
+ double *x_hot,
+ double *y_hot);
GDK_AVAILABLE_IN_ALL
HICON gdk_win32_pixbuf_to_hicon_libgtk_only (GdkPixbuf *pixbuf);
GDK_AVAILABLE_IN_ALL
guint n_valuator : 4;
guint direction : 4;
guint last_value_valid : 1;
- gdouble last_value;
- gdouble increment;
+ double last_value;
+ double increment;
};
struct _GdkX11DeviceXI2
int device_id;
GArray *scroll_valuators;
- gdouble *last_axes;
+ double *last_axes;
};
struct _GdkX11DeviceXI2Class
static void gdk_x11_device_xi2_get_state (GdkDevice *device,
GdkSurface *surface,
- gdouble *axes,
+ double *axes,
GdkModifierType *mask);
static void gdk_x11_device_xi2_set_surface_cursor (GdkDevice *device,
GdkSurface *surface,
static void gdk_x11_device_xi2_query_state (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask);
static GdkGrabStatus gdk_x11_device_xi2_grab (GdkDevice *device,
guint32 time_);
static GdkSurface * gdk_x11_device_xi2_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask);
static void
gdk_x11_device_xi2_get_state (GdkDevice *device,
GdkSurface *surface,
- gdouble *axes,
+ double *axes,
GdkModifierType *mask)
{
GdkX11DeviceXI2 *device_xi2 = GDK_X11_DEVICE_XI2 (device);
{
XIAnyClassInfo *class_info = info->classes[i];
GdkAxisUse use;
- gdouble value;
+ double value;
if (class_info->type != XIValuatorClass)
continue;
gdk_x11_device_xi2_query_state (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask)
{
GdkX11DeviceXI2 *device_xi2 = GDK_X11_DEVICE_XI2 (device);
GdkDisplay *display;
GdkX11Screen *default_screen;
Window xroot_window, xchild_window, xwindow;
- gdouble xroot_x, xroot_y, xwin_x, xwin_y;
+ double xroot_x, xroot_y, xwin_x, xwin_y;
XIButtonState button_state;
XIModifierState mod_state;
XIGroupState group_state;
static GdkSurface *
gdk_x11_device_xi2_surface_at_position (GdkDevice *device,
- gdouble *win_x,
- gdouble *win_y,
+ double *win_x,
+ double *win_y,
GdkModifierType *mask)
{
GdkX11Surface *impl;
Display *xdisplay;
GdkSurface *surface;
Window xwindow, root, child, last = None;
- gdouble xroot_x, xroot_y, xwin_x, xwin_y;
+ double xroot_x, xroot_y, xwin_x, xwin_y;
XIButtonState button_state = { 0 };
XIModifierState mod_state;
XIGroupState group_state;
_gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device,
guint n_valuator,
GdkScrollDirection direction,
- gdouble increment)
+ double increment)
{
ScrollValuator scroll;
gboolean
_gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device,
guint n_valuator,
- gdouble valuator_value,
+ double valuator_value,
GdkScrollDirection *direction_ret,
- gdouble *delta_ret)
+ double *delta_ret)
{
guint i;
return device->device_id;
}
-gdouble
+double
gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device,
int n_axis)
{
void
gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device,
- gdouble *axes,
+ double *axes,
int n_axes)
{
g_free (device->last_axes);
if (axes && n_axes)
- device->last_axes = g_memdup (axes, sizeof (gdouble) * n_axes);
+ device->last_axes = g_memdup (axes, sizeof (double) * n_axes);
else
device->last_axes = NULL;
}
translate_valuator_class (GdkDisplay *display,
GdkDevice *device,
Atom valuator_label,
- gdouble min,
- gdouble max,
- gdouble resolution)
+ double min,
+ double max,
+ double resolution)
{
static gboolean initialized = FALSE;
static Atom label_atoms [GDK_AXIS_LAST] = { 0 };
gdk_x11_surface_set_user_time (surface, time);
}
-static gdouble *
+static double *
translate_axes (GdkDevice *device,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GdkSurface *surface,
XIValuatorState *valuators)
{
guint n_axes, i;
- gdouble *axes;
- gdouble *vals;
+ double *axes;
+ double *vals;
n_axes = gdk_device_get_n_axes (device);
- axes = g_new0 (gdouble, n_axes);
+ axes = g_new0 (double, n_axes);
vals = valuators->values;
for (i = 0; i < MIN (valuators->mask_len * 8, n_axes); i++)
{
GdkAxisUse use;
- gdouble val;
+ double val;
if (!XIMaskIsSet (valuators->mask, i))
{
static gboolean
scroll_valuators_changed (GdkX11DeviceXI2 *device,
XIValuatorState *valuators,
- gdouble *dx,
- gdouble *dy)
+ double *dx,
+ double *dy)
{
gboolean has_scroll_valuators = FALSE;
GdkScrollDirection direction;
guint n_axes, i, n_val;
- gdouble *vals;
+ double *vals;
n_axes = gdk_device_get_n_axes (GDK_DEVICE (device));
vals = valuators->values;
for (i = 0; i < MIN (valuators->mask_len * 8, n_axes); i++)
{
- gdouble delta;
+ double delta;
if (!XIMaskIsSet (valuators->mask, i))
continue;
case XI_Motion:
{
XIDeviceEvent *xev = (XIDeviceEvent *) ev;
- gdouble delta_x, delta_y;
+ double delta_x, delta_y;
double x, y;
double *axes;
static void
gdk_drag_update (GdkDrag *drag,
- gdouble x_root,
- gdouble y_root,
+ double x_root,
+ double y_root,
GdkModifierType mods,
guint32 evtime)
{
GdkEvent *real_event)
{
GdkEvent *event;
- gdouble x, y;
+ double x, y;
g_assert (evtype == GDK_ENTER_NOTIFY || evtype == GDK_LEAVE_NOTIFY);
void _gdk_x11_device_xi2_add_scroll_valuator (GdkX11DeviceXI2 *device,
guint n_valuator,
GdkScrollDirection direction,
- gdouble increment);
+ double increment);
gboolean _gdk_x11_device_xi2_get_scroll_delta (GdkX11DeviceXI2 *device,
guint n_valuator,
- gdouble valuator_value,
+ double valuator_value,
GdkScrollDirection *direction_ret,
- gdouble *delta_ret);
+ double *delta_ret);
void _gdk_device_xi2_reset_scroll_valuators (GdkX11DeviceXI2 *device);
-gdouble gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device,
+double gdk_x11_device_xi2_get_last_axis_value (GdkX11DeviceXI2 *device,
int n_axis);
void gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device,
- gdouble *axes,
+ double *axes,
int n_axes);
gboolean _gdk_x11_display_supports_cursor_alpha (GdkDisplay *display);
{
*geom_mask |= GDK_HINT_ASPECT;
- geometry->min_aspect = (gdouble) size_hints->min_aspect.x / (gdouble) size_hints->min_aspect.y;
- geometry->max_aspect = (gdouble) size_hints->max_aspect.x / (gdouble) size_hints->max_aspect.y;
+ geometry->min_aspect = (double) size_hints->min_aspect.x / (double) size_hints->min_aspect.y;
+ geometry->max_aspect = (double) size_hints->max_aspect.x / (double) size_hints->max_aspect.y;
}
if (size_hints->flags & PWinGravity)
static gboolean
gdk_x11_surface_get_device_state (GdkSurface *surface,
GdkDevice *device,
- gdouble *x,
- gdouble *y,
+ double *x,
+ double *y,
GdkModifierType *mask)
{
GdkSurface *child;
static void
check_maximize (MoveResizeData *mv_resize,
- gdouble x_root,
- gdouble y_root)
+ double x_root,
+ double y_root)
{
GdkSurfaceState state;
int y;
static void
check_unmaximize (MoveResizeData *mv_resize,
- gdouble x_root,
- gdouble y_root)
+ double x_root,
+ double y_root)
{
GdkSurfaceState state;
int dx, dy;
static gboolean
get_double_default (GdkX11Screen *x11_screen,
const char *option,
- gdouble *value)
+ double *value)
{
Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen);
char *v, *e;
double clip_x1, clip_x2, clip_y1, clip_y2, clip_width, clip_height;
cairo_surface_t *surface;
cairo_t *blur_cr;
- gdouble clip_radius;
- gdouble x_scale, y_scale;
+ double clip_radius;
+ double x_scale, y_scale;
gboolean blur_x = (blur_flags & GSK_BLUR_X) != 0;
gboolean blur_y = (blur_flags & GSK_BLUR_Y) != 0;
{
cairo_t *original_cr;
cairo_surface_t *surface;
- gdouble x_scale;
+ double x_scale;
if (!needs_blur (radius, blur_flags))
return cr;
cairo_rectangle_int_t *drawn_rect)
{
GskBlurFlags blur_flags = GSK_BLUR_REPEAT;
- gdouble clip_radius;
+ double clip_radius;
int x1, x2, y1, y2;
clip_radius = gsk_cairo_blur_compute_pixels (radius);
static void
gtk_level_bar_accessible_get_value_and_text (AtkValue *obj,
- gdouble *value,
+ double *value,
char **text)
{
GtkWidget *widget;
static void
gtk_level_bar_accessible_set_value (AtkValue *obj,
- const gdouble value)
+ const double value)
{
GtkWidget *widget;
GtkLevelBar *level_bar;
static void
gtk_paned_accessible_get_value_and_text (AtkValue *obj,
- gdouble *value,
+ double *value,
char **text)
{
GtkWidget *widget;
static void
gtk_paned_accessible_set_value (AtkValue *obj,
- const gdouble value)
+ const double value)
{
GtkWidget *widget;
GtkPaned *paned;
static void
gtk_progress_bar_accessible_get_value_and_text (AtkValue *obj,
- gdouble *value,
+ double *value,
char **text)
{
GtkWidget *widget;
{
GtkWidget *widget;
GtkAdjustment *adjustment;
- gdouble max;
+ double max;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
adjustment = gtk_range_get_adjustment (GTK_RANGE (widget));
static void
gtk_range_accessible_get_value_and_text (AtkValue *obj,
- gdouble *value,
+ double *value,
char **text)
{
GtkWidget *widget;
{
GtkWidget *widget;
GtkAdjustment *adjustment;
- gdouble min, max;
+ double min, max;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (obj));
adjustment = gtk_range_get_adjustment (GTK_RANGE (widget));
static void
gtk_range_accessible_set_value (AtkValue *obj,
- const gdouble value)
+ const double value)
{
GtkWidget *widget;
GtkAdjustment *adjustment;
gtk_adjustment_set_value (adjustment, value);
}
-static gdouble
+static double
gtk_range_accessible_get_increment (AtkValue *obj)
{
GtkWidget *widget;
static void
gtk_scale_button_accessible_get_value_and_text (AtkValue *obj,
- gdouble *value,
+ double *value,
char **text)
{
GtkWidget *widget;
static void
gtk_scale_button_accessible_set_value (AtkValue *obj,
- const gdouble value)
+ const double value)
{
GtkWidget *widget;
GtkAdjustment *adjustment;
gtk_adjustment_set_value (adjustment, value);
}
-static gdouble
+static double
gtk_scale_button_accessible_get_increment (AtkValue *obj)
{
GtkWidget *widget;
static void
gtk_spin_button_accessible_get_value_and_text (AtkValue *obj,
- gdouble *value,
+ double *value,
char **text)
{
GtkWidget *widget;
static void
gtk_spin_button_accessible_set_value (AtkValue *obj,
- const gdouble value)
+ const double value)
{
GtkWidget *widget;
GtkAdjustment *adjustment;
gtk_adjustment_set_value (adjustment, value);
}
-static gdouble
+static double
gtk_spin_button_accessible_get_increment (AtkValue *obj)
{
GtkWidget *widget;
gboolean foreground_set, strikethrough_set, strikethrough;
gboolean scale_set, underline_set, rise_set;
char *renderer_text;
- gdouble scale;
+ double scale;
int rise;
GtkRendererCellAccessible *gail_renderer;
GtkCellRendererText *gtk_renderer;
GtkTextIter iter;
AtkAttributeSet *attrib_set = NULL;
GSList *tags, *temp_tags;
- gdouble scale = 1;
+ double scale = 1;
gboolean val_set = FALSE;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (text));
g_object_get (tag, "scale-set", &scale_set, NULL);
if (scale_set)
{
- gdouble font_scale;
+ double font_scale;
g_object_get (tag, "scale", &font_scale, NULL);
val_set = TRUE;
scale *= font_scale;
static gboolean
parse_media_size (const char *size,
- gdouble *width_mm,
- gdouble *height_mm)
+ double *width_mm,
+ double *height_mm)
{
const char *p;
char *e;
- gdouble short_dim, long_dim;
+ double short_dim, long_dim;
p = size;
main (int argc, char *argv[])
{
int i, j, offset;
- gdouble width, height;
+ double width, height;
names = (NameInfo *) malloc (sizeof (NameInfo) * (4 + n_infos + 2 * n_extra));
n_names = 0;
variant = g_variant_new_handle ((guint) l);
}
else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_DOUBLE))
- variant = g_variant_new_double ((gdouble) l);
+ variant = g_variant_new_double ((double) l);
return variant;
}
const GVariantType *expected_type)
{
GVariant *variant = NULL;
- gdouble d;
+ double d;
gint64 l;
if (G_VALUE_HOLDS_DOUBLE (value))
variant = g_variant_new_handle ((guint) l);
}
else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_DOUBLE))
- variant = g_variant_new_double ((gdouble) d);
+ variant = g_variant_new_double ((double) d);
return variant;
}
variant = g_variant_new_handle ((guint) u);
}
else if (g_variant_type_equal (expected_type, G_VARIANT_TYPE_DOUBLE))
- variant = g_variant_new_double ((gdouble) u);
+ variant = g_variant_new_double ((double) u);
return variant;
}
GVariant *variant)
{
const GVariantType *type;
- gdouble d;
+ double d;
gint64 l;
type = g_variant_get_type (variant);
{
GskPangoRenderer *crenderer = (GskPangoRenderer *) (renderer);
cairo_t *cr;
- gdouble x, y;
+ double x, y;
cr = gtk_snapshot_append_cairo (crenderer->snapshot, &crenderer->bounds);
struct _GtkAdjustmentPrivate {
- gdouble lower;
- gdouble upper;
- gdouble value;
- gdouble step_increment;
- gdouble page_increment;
- gdouble page_size;
+ double lower;
+ double upper;
+ double value;
+ double step_increment;
+ double page_increment;
+ double page_size;
- gdouble source;
- gdouble target;
+ double source;
+ double target;
guint duration;
gint64 start_time;
GParamSpec *pspec)
{
GtkAdjustment *adjustment = GTK_ADJUSTMENT (object);
- gdouble double_value = g_value_get_double (value);
+ double double_value = g_value_get_double (value);
switch (prop_id)
{
* Returns: a new #GtkAdjustment
*/
GtkAdjustment *
-gtk_adjustment_new (gdouble value,
- gdouble lower,
- gdouble upper,
- gdouble step_increment,
- gdouble page_increment,
- gdouble page_size)
+gtk_adjustment_new (double value,
+ double lower,
+ double upper,
+ double step_increment,
+ double page_increment,
+ double page_size)
{
return g_object_new (GTK_TYPE_ADJUSTMENT,
"lower", lower,
*
* Returns: The current value of the adjustment
**/
-gdouble
+double
gtk_adjustment_get_value (GtkAdjustment *adjustment)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
return priv->value;
}
-gdouble
+double
gtk_adjustment_get_target_value (GtkAdjustment *adjustment)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
static void
adjustment_set_value (GtkAdjustment *adjustment,
- gdouble value)
+ double value)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
/* From clutter-easing.c, based on Robert Penner's
* infamous easing equations, MIT license.
*/
-static gdouble
-ease_out_cubic (gdouble t)
+static double
+ease_out_cubic (double t)
{
- gdouble p = t - 1;
+ double p = t - 1;
return p * p * p + 1;
}
if (now < priv->end_time)
{
- gdouble t;
+ double t;
- t = (now - priv->start_time) / (gdouble) (priv->end_time - priv->start_time);
+ t = (now - priv->start_time) / (double) (priv->end_time - priv->start_time);
t = ease_out_cubic (t);
adjustment_set_value (adjustment, priv->source + t * (priv->target - priv->source));
}
static void
gtk_adjustment_set_value_internal (GtkAdjustment *adjustment,
- gdouble value,
+ double value,
gboolean animate)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
*/
void
gtk_adjustment_set_value (GtkAdjustment *adjustment,
- gdouble value)
+ double value)
{
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
void
gtk_adjustment_animate_to_value (GtkAdjustment *adjustment,
- gdouble value)
+ double value)
{
g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment));
*
* Returns: The current minimum value of the adjustment
**/
-gdouble
+double
gtk_adjustment_get_lower (GtkAdjustment *adjustment)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
**/
void
gtk_adjustment_set_lower (GtkAdjustment *adjustment,
- gdouble lower)
+ double lower)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
*
* Returns: The current maximum value of the adjustment
**/
-gdouble
+double
gtk_adjustment_get_upper (GtkAdjustment *adjustment)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
**/
void
gtk_adjustment_set_upper (GtkAdjustment *adjustment,
- gdouble upper)
+ double upper)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
*
* Returns: The current step increment of the adjustment.
**/
-gdouble
+double
gtk_adjustment_get_step_increment (GtkAdjustment *adjustment)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
**/
void
gtk_adjustment_set_step_increment (GtkAdjustment *adjustment,
- gdouble step_increment)
+ double step_increment)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
*
* Returns: The current page increment of the adjustment
**/
-gdouble
+double
gtk_adjustment_get_page_increment (GtkAdjustment *adjustment)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
**/
void
gtk_adjustment_set_page_increment (GtkAdjustment *adjustment,
- gdouble page_increment)
+ double page_increment)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
*
* Returns: The current page size of the adjustment
**/
-gdouble
+double
gtk_adjustment_get_page_size (GtkAdjustment *adjustment)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
**/
void
gtk_adjustment_set_page_size (GtkAdjustment *adjustment,
- gdouble page_size)
+ double page_size)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
**/
void
gtk_adjustment_configure (GtkAdjustment *adjustment,
- gdouble value,
- gdouble lower,
- gdouble upper,
- gdouble step_increment,
- gdouble page_increment,
- gdouble page_size)
+ double value,
+ double lower,
+ double upper,
+ double step_increment,
+ double page_increment,
+ double page_size)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
gboolean value_changed = FALSE;
*/
void
gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
- gdouble lower,
- gdouble upper)
+ double lower,
+ double upper)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
gboolean need_emission;
*
* Returns: the minimum increment of @adjustment
*/
-gdouble
+double
gtk_adjustment_get_minimum_increment (GtkAdjustment *adjustment)
{
GtkAdjustmentPrivate *priv = gtk_adjustment_get_instance_private (adjustment);
- gdouble minimum_increment;
+ double minimum_increment;
g_return_val_if_fail (GTK_IS_ADJUSTMENT (adjustment), 0);
GDK_AVAILABLE_IN_ALL
GType gtk_adjustment_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
-GtkAdjustment* gtk_adjustment_new (gdouble value,
- gdouble lower,
- gdouble upper,
- gdouble step_increment,
- gdouble page_increment,
- gdouble page_size);
+GtkAdjustment* gtk_adjustment_new (double value,
+ double lower,
+ double upper,
+ double step_increment,
+ double page_increment,
+ double page_size);
GDK_AVAILABLE_IN_ALL
void gtk_adjustment_clamp_page (GtkAdjustment *adjustment,
- gdouble lower,
- gdouble upper);
+ double lower,
+ double upper);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_adjustment_get_value (GtkAdjustment *adjustment);
+double gtk_adjustment_get_value (GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL
void gtk_adjustment_set_value (GtkAdjustment *adjustment,
- gdouble value);
+ double value);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_adjustment_get_lower (GtkAdjustment *adjustment);
+double gtk_adjustment_get_lower (GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL
void gtk_adjustment_set_lower (GtkAdjustment *adjustment,
- gdouble lower);
+ double lower);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_adjustment_get_upper (GtkAdjustment *adjustment);
+double gtk_adjustment_get_upper (GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL
void gtk_adjustment_set_upper (GtkAdjustment *adjustment,
- gdouble upper);
+ double upper);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_adjustment_get_step_increment (GtkAdjustment *adjustment);
+double gtk_adjustment_get_step_increment (GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL
void gtk_adjustment_set_step_increment (GtkAdjustment *adjustment,
- gdouble step_increment);
+ double step_increment);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_adjustment_get_page_increment (GtkAdjustment *adjustment);
+double gtk_adjustment_get_page_increment (GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL
void gtk_adjustment_set_page_increment (GtkAdjustment *adjustment,
- gdouble page_increment);
+ double page_increment);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_adjustment_get_page_size (GtkAdjustment *adjustment);
+double gtk_adjustment_get_page_size (GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL
void gtk_adjustment_set_page_size (GtkAdjustment *adjustment,
- gdouble page_size);
+ double page_size);
GDK_AVAILABLE_IN_ALL
void gtk_adjustment_configure (GtkAdjustment *adjustment,
- gdouble value,
- gdouble lower,
- gdouble upper,
- gdouble step_increment,
- gdouble page_increment,
- gdouble page_size);
-GDK_AVAILABLE_IN_ALL
-gdouble gtk_adjustment_get_minimum_increment (GtkAdjustment *adjustment);
+ double value,
+ double lower,
+ double upper,
+ double step_increment,
+ double page_increment,
+ double page_size);
+GDK_AVAILABLE_IN_ALL
+double gtk_adjustment_get_minimum_increment (GtkAdjustment *adjustment);
G_END_DECLS
guint duration);
guint gtk_adjustment_get_animation_duration (GtkAdjustment *adjustment);
void gtk_adjustment_animate_to_value (GtkAdjustment *adjustment,
- gdouble value);
-gdouble gtk_adjustment_get_target_value (GtkAdjustment *adjustment);
+ double value);
+double gtk_adjustment_get_target_value (GtkAdjustment *adjustment);
gboolean gtk_adjustment_is_animating (GtkAdjustment *adjustment);
case G_TYPE_FLOAT:
case G_TYPE_DOUBLE:
{
- gdouble d;
+ double d;
char *endptr = NULL;
errno = 0;
d = g_ascii_strtod (string, &endptr);
static void
click_pressed_cb (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkWidget *widget)
{
GtkButton *button = GTK_BUTTON (widget);
static void
click_released_cb (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkWidget *widget)
{
GtkButton *button = GTK_BUTTON (widget);
int day);
static gboolean gtk_calendar_scroll_controller_scroll (GtkEventControllerScroll *scroll,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkWidget *widget);
static void calendar_set_month_prev (GtkCalendar *calendar);
static gboolean
gtk_calendar_scroll_controller_scroll (GtkEventControllerScroll *scroll,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkWidget *widget)
{
GtkCalendar *calendar = GTK_CALENDAR (widget);
{
GtkWidget *spin;
GtkAdjustment *adjustment;
- gdouble climb_rate;
+ double climb_rate;
guint digits;
};
{
GtkCellRendererSpinner *cell = GTK_CELL_RENDERER_SPINNER (cellr);
GtkCellRendererSpinnerPrivate *priv = gtk_cell_renderer_spinner_get_instance_private (cell);
- gdouble align;
+ double align;
int w, h;
int xpad, ypad;
float xalign, yalign;
{
GdkRGBA color;
guint num_steps;
- gdouble dx, dy;
- gdouble radius;
- gdouble half;
+ double dx, dy;
+ double radius;
+ double half;
int i;
guint real_step;
int inset = 0.7 * radius;
/* transparency is a function of time and initial value */
- gdouble t = (gdouble) ((i + num_steps - real_step)
+ double t = (double) ((i + num_steps - real_step)
% num_steps) / num_steps;
cairo_save (cr);
char *text;
char *placeholder_text;
- gdouble font_scale;
+ double font_scale;
int rise;
int fixed_height_rows;
/* UI construction {{{1 */
static guint
-scale_round (gdouble value, gdouble scale)
+scale_round (double value, double scale)
{
value = floor (value * scale + 0.5);
value = MAX (value, 0);
gtk_color_editor_iface_init))
static guint
-scale_round (gdouble value, gdouble scale)
+scale_round (double value, double scale)
{
value = floor (value * scale + 0.5);
value = MAX (value, 0);
hsv_changed (GtkColorEditor *editor)
{
GdkRGBA color;
- gdouble h, s, v, a;
+ double h, s, v, a;
h = gtk_adjustment_get_value (editor->h_adj);
s = gtk_adjustment_get_value (editor->s_adj);
value_changed (GtkAdjustment *a,
GtkAdjustment *as)
{
- gdouble scale;
+ double scale;
scale = gtk_adjustment_get_upper (as) / gtk_adjustment_get_upper (a);
g_signal_handlers_block_by_func (as, value_changed, a);
static GtkAdjustment *
scaled_adjustment (GtkAdjustment *a,
- gdouble scale)
+ double scale)
{
GtkAdjustment *as;
int *x,
int *y)
{
- gdouble s, v;
+ double s, v;
int width, height;
width = gtk_widget_get_width (GTK_WIDGET (plane));
guint32 *data, *p;
float h, s, v;
float r, g, b;
- gdouble sf, vf;
+ double sf, vf;
int x, y;
if (!gtk_widget_get_realized (widget))
int y)
{
GtkWidget *widget = GTK_WIDGET (plane);
- gdouble s, v;
+ double s, v;
s = CLAMP (1 - y * (1.0 / gtk_widget_get_height (widget)), 0, 1);
v = CLAMP (x * (1.0 / gtk_widget_get_width (widget)), 0, 1);
static void
hold_action (GtkGestureLongPress *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkWidget *plane)
{
gtk_widget_activate_action (plane,
static void
sv_move (GtkColorPlane *plane,
- gdouble ds,
- gdouble dv)
+ double ds,
+ double dv)
{
- gdouble s, v;
+ double s, v;
s = gtk_adjustment_get_value (plane->priv->s_adj);
v = gtk_adjustment_get_value (plane->priv->v_adj);
GtkWidget *widget)
{
GtkColorPlane *plane = GTK_COLOR_PLANE (widget);
- gdouble step;
+ double step;
if ((state & GDK_ALT_MASK) != 0)
step = 0.1;
static void
plane_drag_gesture_begin (GtkGestureDrag *gesture,
- gdouble start_x,
- gdouble start_y,
+ double start_x,
+ double start_y,
GtkWidget *plane)
{
guint button;
static void
plane_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkColorPlane *plane)
{
- gdouble start_x, start_y;
+ double start_x, start_y;
gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture),
&start_x, &start_y);
static void
plane_drag_gesture_end (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkColorPlane *plane)
{
set_cross_cursor (GTK_WIDGET (plane), FALSE);
};
static void hold_action (GtkGestureLongPress *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkWidget *scale);
static void click_action (GtkGestureClick *gesture,
int stride;
GBytes *bytes;
guchar *data, *p;
- gdouble h;
+ double h;
float r, g, b;
- gdouble f;
+ double f;
int hue_x, hue_y;
stride = width * 3;
static void
hold_action (GtkGestureLongPress *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkWidget *scale)
{
gtk_widget_activate_action (scale,
GtkWidget parent_instance;
GdkRGBA color;
- gdouble radius[4];
+ double radius[4];
char *icon;
guint has_color : 1;
guint use_alpha : 1;
static void
hold_action (GtkGestureLongPress *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkColorSwatch *swatch)
{
do_popup (swatch);
static void
tap_action (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkColorSwatch *swatch)
{
guint button;
gboolean gtk_color_swatch_get_rgba (GtkColorSwatch *swatch,
GdkRGBA *color);
void gtk_color_swatch_set_hsva (GtkColorSwatch *swatch,
- gdouble h,
- gdouble s,
- gdouble v,
- gdouble a);
+ double h,
+ double s,
+ double v,
+ double a);
void gtk_color_swatch_set_can_drop (GtkColorSwatch *swatch,
gboolean can_drop);
void gtk_color_swatch_set_icon (GtkColorSwatch *swatch,
static gboolean gtk_combo_box_real_popdown (GtkComboBox *combo_box);
static gboolean gtk_combo_box_scroll_controller_scroll (GtkEventControllerScroll *scroll,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkComboBox *combo_box);
/* listening to the model */
* {
* GtkTreeIter iter;
* GtkTreeModel model;
- * gdouble value;
+ * double value;
*
* model = gtk_combo_box_get_model (combo);
*
static gboolean
gtk_combo_box_scroll_controller_scroll (GtkEventControllerScroll *scroll,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkComboBox *combo_box)
{
GtkComboBoxPrivate *priv = gtk_combo_box_get_instance_private (combo_box);
static inline void
gtk_css_boxes_clamp_border_radius (GskRoundedRect *box)
{
- gdouble factor = 1.0;
- gdouble corners;
+ double factor = 1.0;
+ double corners;
corners = box->corner[GSK_CORNER_TOP_LEFT].width + box->corner[GSK_CORNER_TOP_RIGHT].width;
if (corners != 0)
struct
{
GtkCssValue *color;
- gdouble factor;
+ double factor;
} shade, alpha;
struct
{
GtkCssValue *color1;
GtkCssValue *color2;
- gdouble factor;
+ double factor;
} mix;
} sym_col;
};
GtkCssValue *
_gtk_css_color_value_new_shade (GtkCssValue *color,
- gdouble factor)
+ double factor)
{
GtkCssValue *value;
GtkCssValue *
_gtk_css_color_value_new_alpha (GtkCssValue *color,
- gdouble factor)
+ double factor)
{
GtkCssValue *value;
GtkCssValue *
_gtk_css_color_value_new_mix (GtkCssValue *color1,
GtkCssValue *color2,
- gdouble factor)
+ double factor)
{
GtkCssValue *value;
GtkCssValue * _gtk_css_color_value_new_literal (const GdkRGBA *color) G_GNUC_PURE;
GtkCssValue * _gtk_css_color_value_new_name (const char *name) G_GNUC_PURE;
GtkCssValue * _gtk_css_color_value_new_shade (GtkCssValue *color,
- gdouble factor) G_GNUC_PURE;
+ double factor) G_GNUC_PURE;
GtkCssValue * _gtk_css_color_value_new_alpha (GtkCssValue *color,
- gdouble factor) G_GNUC_PURE;
+ double factor) G_GNUC_PURE;
GtkCssValue * _gtk_css_color_value_new_mix (GtkCssValue *color1,
GtkCssValue *color2,
- gdouble factor) G_GNUC_PURE;
+ double factor) G_GNUC_PURE;
GtkCssValue * _gtk_css_color_value_new_current_color (void) G_GNUC_PURE;
gboolean gtk_css_color_value_can_parse (GtkCssParser *parser);
static void
unit_widget_set (GtkWidget *unit_widget,
- gdouble value)
+ double value)
{
UnitWidget *data;
int hot_x;
int hot_y;
- gdouble start_x;
- gdouble start_y;
+ double start_x;
+ double start_y;
GdkDrag *drag;
};
static void
icon_pressed_cb (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkEntry *entry)
{
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
static void
icon_released_cb (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkEntry *entry)
{
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
static void
icon_drag_update_cb (GtkGestureDrag *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkEntry *entry)
{
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
- gdouble start_x, start_y;
+ double start_x, start_y;
GtkEntryIconPosition pos;
EntryIconInfo *icon_info;
*/
void
gtk_entry_set_progress_fraction (GtkEntry *entry,
- gdouble fraction)
+ double fraction)
{
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
- gdouble old_fraction;
+ double old_fraction;
g_return_if_fail (GTK_IS_ENTRY (entry));
*
* Returns: a fraction from 0.0 to 1.0
*/
-gdouble
+double
gtk_entry_get_progress_fraction (GtkEntry *entry)
{
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
*/
void
gtk_entry_set_progress_pulse_step (GtkEntry *entry,
- gdouble fraction)
+ double fraction)
{
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
*
* Returns: a fraction from 0.0 to 1.0
*/
-gdouble
+double
gtk_entry_get_progress_pulse_step (GtkEntry *entry)
{
GtkEntryPrivate *priv = gtk_entry_get_instance_private (entry);
*/
GDK_AVAILABLE_IN_ALL
void gtk_entry_set_progress_fraction (GtkEntry *entry,
- gdouble fraction);
+ double fraction);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_entry_get_progress_fraction (GtkEntry *entry);
+double gtk_entry_get_progress_fraction (GtkEntry *entry);
GDK_AVAILABLE_IN_ALL
void gtk_entry_set_progress_pulse_step (GtkEntry *entry,
- gdouble fraction);
+ double fraction);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_entry_get_progress_pulse_step (GtkEntry *entry);
+double gtk_entry_get_progress_pulse_step (GtkEntry *entry);
GDK_AVAILABLE_IN_ALL
void gtk_entry_progress_pulse (GtkEntry *entry);
typedef struct
{
- gdouble dx;
- gdouble dy;
+ double dx;
+ double dy;
guint32 evtime;
} ScrollHistoryElem;
GArray *scroll_history;
/* For discrete event coalescing */
- gdouble cur_dx;
- gdouble cur_dy;
+ double cur_dx;
+ double cur_dy;
guint active : 1;
};
static void
scroll_history_push (GtkEventControllerScroll *scroll,
- gdouble delta_x,
- gdouble delta_y,
+ double delta_x,
+ double delta_y,
guint32 evtime)
{
ScrollHistoryElem new_item;
static void
scroll_history_finish (GtkEventControllerScroll *scroll,
- gdouble *velocity_x,
- gdouble *velocity_y)
+ double *velocity_x,
+ double *velocity_y)
{
- gdouble accum_dx = 0, accum_dy = 0;
+ double accum_dx = 0, accum_dy = 0;
guint32 first = 0, last = 0;
guint i;
{
GtkEventControllerScroll *scroll = GTK_EVENT_CONTROLLER_SCROLL (controller);
GdkScrollDirection direction = GDK_SCROLL_SMOOTH;
- gdouble dx = 0, dy = 0;
+ double dx = 0, dy = 0;
gboolean handled = GDK_EVENT_PROPAGATE;
if (gdk_event_get_event_type (event) != GDK_SCROLL)
if (scroll->flags & GTK_EVENT_CONTROLLER_SCROLL_KINETIC)
{
- gdouble vel_x, vel_y;
+ double vel_x, vel_y;
scroll_history_finish (scroll, &vel_x, &vel_y);
g_signal_emit (controller, signals[DECELERATE], 0, vel_x, vel_y);
/* Gestures */
static void gesture_click_released_cb (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkExpander *expander);
G_DEFINE_TYPE_WITH_CODE (GtkExpander, gtk_expander, GTK_TYPE_WIDGET,
static void
gesture_click_released_cb (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkExpander *expander)
{
gtk_widget_activate (GTK_WIDGET (expander));
static void
file_list_show_popover (GtkFileChooserWidget *impl,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GdkRectangle rect;
GtkTreeSelection *selection;
static void
long_press_cb (GtkGesture *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkFileChooserWidget *impl)
{
file_list_show_popover (impl, x, y);
GtkFlowBox *box = GTK_FLOW_BOX (data);
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
GtkAdjustment *adjustment;
- gdouble factor;
- gdouble increment;
- gdouble value;
+ double factor;
+ double increment;
+ double value;
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
adjustment = priv->vadjustment;
if (priv->rubberband_select)
{
GdkEventSequence *sequence;
- gdouble x, y;
+ double x, y;
GtkFlowBoxChild *child;
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (priv->drag_gesture));
static void
gtk_flow_box_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkFlowBox *box)
{
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
- gdouble start_x, start_y;
+ double start_x, start_y;
GtkFlowBoxChild *child;
GtkCssNode *widget_node;
static void
gtk_flow_box_click_gesture_pressed (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkFlowBox *box)
{
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
static void
gtk_flow_box_click_unpaired_release (GtkGestureClick *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
guint button,
GdkEventSequence *sequence,
GtkFlowBox *box)
static void
gtk_flow_box_click_gesture_released (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkFlowBox *box)
{
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
static void
gtk_flow_box_drag_gesture_begin (GtkGestureDrag *gesture,
- gdouble start_x,
- gdouble start_y,
+ double start_x,
+ double start_y,
GtkWidget *widget)
{
GtkFlowBoxPrivate *priv = BOX_PRIV (widget);
static void
gtk_flow_box_drag_gesture_end (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkFlowBox *box)
{
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
{
GtkFontChooserWidget *fontchooser = user_data;
PangoFontDescription *font_desc;
- gdouble size = gtk_adjustment_get_value (adjustment);
+ double size = gtk_adjustment_get_value (adjustment);
font_desc = pango_font_description_new ();
if (pango_font_description_get_size_is_absolute (fontchooser->font_desc))
{
GtkAdjustment *adjustment;
char *text;
- gdouble value;
+ double value;
adjustment = gtk_spin_button_get_adjustment (spin);
value = gtk_adjustment_get_value (adjustment);
const int *sizes;
int *font_sizes;
int i, n_sizes;
- gdouble value, spin_value;
+ double value, spin_value;
gpointer item;
item = gtk_single_selection_get_selected_item (self->selection);
spin_value = gtk_adjustment_get_value (spin_adj);
if (spin_value < sizes[0])
- value = (gdouble) sizes[0];
+ value = (double) sizes[0];
else if (spin_value > sizes[n_sizes - 1])
- value = (gdouble)sizes[n_sizes - 1];
+ value = (double)sizes[n_sizes - 1];
else
- value = (gdouble)spin_value;
+ value = (double)spin_value;
/* ensure clamping doesn't callback into font resizing code */
g_signal_handlers_block_by_func (adj, size_change_cb, self);
/* Set the upper values of the spin/scale with G_MAXINT / PANGO_SCALE */
gtk_spin_button_set_range (GTK_SPIN_BUTTON (self->size_spin),
- 1.0, (gdouble)(G_MAXINT / PANGO_SCALE));
+ 1.0, (double)(G_MAXINT / PANGO_SCALE));
gtk_adjustment_set_upper (gtk_range_get_adjustment (GTK_RANGE (self->size_slider)),
- (gdouble)(G_MAXINT / PANGO_SCALE));
+ (double)(G_MAXINT / PANGO_SCALE));
self->tweak_action = G_ACTION (g_simple_action_new_stateful ("tweak", NULL, g_variant_new_boolean (FALSE)));
g_signal_connect (self->tweak_action, "change-state", G_CALLBACK (change_tweak), self);
{
GdkEvent *event;
GtkWidget *target;
- gdouble widget_x;
- gdouble widget_y;
+ double widget_x;
+ double widget_y;
/* Acummulators for touchpad events */
- gdouble accum_dx;
- gdouble accum_dy;
+ double accum_dx;
+ double accum_dy;
guint press_handled : 1;
guint state : 2;
gboolean
gtk_gesture_get_point (GtkGesture *gesture,
GdkEventSequence *sequence,
- gdouble *x,
- gdouble *y)
+ double *x,
+ double *y)
{
GtkGesturePrivate *priv;
PointData *data;
GdkRectangle *rect)
{
GtkGesturePrivate *priv;
- gdouble x1, y1, x2, y2;
+ double x1, y1, x2, y2;
GHashTableIter iter;
guint n_points = 0;
PointData *data;
**/
gboolean
gtk_gesture_get_bounding_box_center (GtkGesture *gesture,
- gdouble *x,
- gdouble *y)
+ double *x,
+ double *y)
{
GdkEvent *last_event;
GdkRectangle rect;
GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_get_point (GtkGesture *gesture,
GdkEventSequence *sequence,
- gdouble *x,
- gdouble *y);
+ double *x,
+ double *y);
GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_get_bounding_box (GtkGesture *gesture,
GdkRectangle *rect);
GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_get_bounding_box_center
(GtkGesture *gesture,
- gdouble *x,
- gdouble *y);
+ double *x,
+ double *y);
GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_is_active (GtkGesture *gesture);
struct _GtkGestureClickPrivate
{
GdkDevice *current_device;
- gdouble initial_press_x;
- gdouble initial_press_y;
+ double initial_press_x;
+ double initial_press_y;
guint double_click_timeout_id;
guint n_presses;
guint n_release;
GdkEvent *event;
GdkEventType event_type;
GdkDevice *device;
- gdouble x, y;
+ double x, y;
if (!gtk_gesture_handles_sequence (gesture, sequence))
return;
{
GtkGestureClick *click;
GdkEventSequence *current;
- gdouble x, y;
+ double x, y;
click = GTK_GESTURE_CLICK (gesture);
current = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
GtkGestureClick *click;
GtkGestureClickPrivate *priv;
GdkEventSequence *current;
- gdouble x, y;
+ double x, y;
gboolean interpreted;
GtkEventSequenceState state;
void (* pressed) (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
void (* released) (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
void (* stopped) (GtkGestureClick *gesture);
/*<private>*/
struct _GtkGestureDragPrivate
{
- gdouble start_x;
- gdouble start_y;
- gdouble last_x;
- gdouble last_y;
+ double start_x;
+ double start_y;
+ double last_x;
+ double last_y;
};
enum {
GdkEventSequence *sequence)
{
GtkGestureDragPrivate *priv;
- gdouble x, y;
+ double x, y;
priv = gtk_gesture_drag_get_instance_private (GTK_GESTURE_DRAG (gesture));
gtk_gesture_get_point (gesture, sequence, &priv->last_x, &priv->last_y);
{
GtkGestureDragPrivate *priv;
GdkEventSequence *current;
- gdouble x, y;
+ double x, y;
current = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
**/
gboolean
gtk_gesture_drag_get_start_point (GtkGestureDrag *gesture,
- gdouble *x,
- gdouble *y)
+ double *x,
+ double *y)
{
GtkGestureDragPrivate *priv;
GdkEventSequence *sequence;
**/
gboolean
gtk_gesture_drag_get_offset (GtkGestureDrag *gesture,
- gdouble *x,
- gdouble *y)
+ double *x,
+ double *y)
{
GtkGestureDragPrivate *priv;
GdkEventSequence *sequence;
GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_drag_get_start_point (GtkGestureDrag *gesture,
- gdouble *x,
- gdouble *y);
+ double *x,
+ double *y);
GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_drag_get_offset (GtkGestureDrag *gesture,
- gdouble *x,
- gdouble *y);
+ double *x,
+ double *y);
G_END_DECLS
GtkGestureSingleClass parent_class;
void (* drag_begin) (GtkGestureDrag *gesture,
- gdouble start_x,
- gdouble start_y);
+ double start_x,
+ double start_y);
void (* drag_update) (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y);
+ double offset_x,
+ double offset_y);
void (* drag_end) (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y);
+ double offset_x,
+ double offset_y);
/*<private>*/
gpointer padding[10];
};
struct _GtkGestureLongPressPrivate
{
- gdouble initial_x;
- gdouble initial_y;
+ double initial_x;
+ double initial_y;
- gdouble delay_factor;
+ double delay_factor;
guint timeout_id;
guint delay;
guint cancelled : 1;
GtkGestureLongPress *gesture = user_data;
GtkGestureLongPressPrivate *priv;
GdkEventSequence *sequence;
- gdouble x, y;
+ double x, y;
priv = gtk_gesture_long_press_get_instance_private (gesture);
sequence = gtk_gesture_get_last_updated_sequence (GTK_GESTURE (gesture));
{
GtkGestureLongPressPrivate *priv;
GtkWidget *widget;
- gdouble x, y;
+ double x, y;
widget = gtk_event_controller_get_widget (GTK_EVENT_CONTROLLER (gesture));
priv = gtk_gesture_long_press_get_instance_private (GTK_GESTURE_LONG_PRESS (gesture));
GtkGestureSingleClass parent_class;
void (* pressed) (GtkGestureLongPress *gesture,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
void (* cancelled) (GtkGestureLongPress *gesture);
/*< private >*/
}
static void
-direction_from_offset (gdouble offset_x,
- gdouble offset_y,
+direction_from_offset (double offset_x,
+ double offset_y,
GtkOrientation orientation,
GtkPanDirection *direction)
{
static gboolean
guess_direction (GtkGesturePan *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkPanDirection *direction)
{
- gdouble abs_x, abs_y;
+ double abs_x, abs_y;
abs_x = ABS (offset_x);
abs_y = ABS (offset_y);
static void
gtk_gesture_pan_drag_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y)
+ double offset_x,
+ double offset_y)
{
GtkGesturePanPrivate *priv;
GtkPanDirection direction;
GtkGesturePan *pan;
- gdouble offset;
+ double offset;
pan = GTK_GESTURE_PAN (gesture);
priv = gtk_gesture_pan_get_instance_private (pan);
static void
gtk_gesture_pan_drag_end (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y)
+ double offset_x,
+ double offset_y)
{
GtkGesturePanPrivate *priv;
void (* pan) (GtkGesturePan *gesture,
GtkPanDirection direction,
- gdouble offset);
+ double offset);
/*< private >*/
gpointer padding[10];
struct _GtkGestureRotatePrivate
{
- gdouble initial_angle;
- gdouble accum_touchpad_angle;
+ double initial_angle;
+ double accum_touchpad_angle;
};
static guint signals[LAST_SIGNAL] = { 0 };
static gboolean
_gtk_gesture_rotate_get_angle (GtkGestureRotate *rotate,
- gdouble *angle)
+ double *angle)
{
GtkGestureRotatePrivate *priv;
GdkEvent *last_event;
- gdouble x1, y1, x2, y2;
+ double x1, y1, x2, y2;
GtkGesture *gesture;
- gdouble dx, dy;
+ double dx, dy;
GList *sequences = NULL;
GdkTouchpadGesturePhase phase;
gboolean retval = FALSE;
_gtk_gesture_rotate_check_emit (GtkGestureRotate *gesture)
{
GtkGestureRotatePrivate *priv;
- gdouble angle, delta;
+ double angle, delta;
if (!_gtk_gesture_rotate_get_angle (gesture, &angle))
return FALSE;
*
* Returns: the angle delta in radians
**/
-gdouble
+double
gtk_gesture_rotate_get_angle_delta (GtkGestureRotate *gesture)
{
GtkGestureRotatePrivate *priv;
- gdouble angle;
+ double angle;
g_return_val_if_fail (GTK_IS_GESTURE_ROTATE (gesture), 0.0);
GtkGesture * gtk_gesture_rotate_new (void);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_gesture_rotate_get_angle_delta (GtkGestureRotate *gesture);
+double gtk_gesture_rotate_get_angle_delta (GtkGestureRotate *gesture);
G_END_DECLS
GtkGestureClass parent_class;
void (* angle_changed) (GtkGestureRotate *gesture,
- gdouble angle,
- gdouble delta);
+ double angle,
+ double delta);
/*< private >*/
gpointer padding[10];
};
gboolean
gtk_gesture_stylus_get_axis (GtkGestureStylus *gesture,
GdkAxisUse axis,
- gdouble *value)
+ double *value)
{
GdkEvent *event;
gboolean
gtk_gesture_stylus_get_axes (GtkGestureStylus *gesture,
GdkAxisUse axes[],
- gdouble **values)
+ double **values)
{
GdkEvent *event;
GArray *array;
if (!event)
return FALSE;
- array = g_array_new (TRUE, FALSE, sizeof (gdouble));
+ array = g_array_new (TRUE, FALSE, sizeof (double));
while (axes[i] != GDK_AXIS_IGNORE)
{
- gdouble value;
+ double value;
if (axes[i] >= GDK_AXIS_LAST)
{
i++;
}
- *values = (gdouble *) g_array_free (array, FALSE);
+ *values = (double *) g_array_free (array, FALSE);
return TRUE;
}
GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_stylus_get_axis (GtkGestureStylus *gesture,
GdkAxisUse axis,
- gdouble *value);
+ double *value);
GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_stylus_get_axes (GtkGestureStylus *gesture,
GdkAxisUse axes[],
- gdouble **values);
+ double **values);
GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_stylus_get_backlog (GtkGestureStylus *gesture,
GdkTimeCoord **backlog,
GtkGestureSingleClass parent_class;
void (*proximity) (GtkGestureStylus *gesture,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
void (*down) (GtkGestureStylus *gesture,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
void (*motion) (GtkGestureStylus *gesture,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
void (*up) (GtkGestureStylus *gesture,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
/*< private >*/
gpointer padding[10];
GtkGestureSwipe *swipe = GTK_GESTURE_SWIPE (gesture);
GtkGestureSwipePrivate *priv;
EventData new;
- gdouble x, y;
+ double x, y;
priv = gtk_gesture_swipe_get_instance_private (swipe);
_gtk_gesture_get_last_update_time (gesture, sequence, &new.evtime);
static void
_gtk_gesture_swipe_calculate_velocity (GtkGestureSwipe *gesture,
- gdouble *velocity_x,
- gdouble *velocity_y)
+ double *velocity_x,
+ double *velocity_y)
{
GtkGestureSwipePrivate *priv;
GdkEventSequence *sequence;
guint32 evtime, diff_time;
EventData *start, *end;
- gdouble diff_x, diff_y;
+ double diff_x, diff_y;
priv = gtk_gesture_swipe_get_instance_private (gesture);
*velocity_x = *velocity_y = 0;
{
GtkGestureSwipe *swipe = GTK_GESTURE_SWIPE (gesture);
GtkGestureSwipePrivate *priv;
- gdouble velocity_x, velocity_y;
+ double velocity_x, velocity_y;
GdkEventSequence *seq;
seq = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
**/
gboolean
gtk_gesture_swipe_get_velocity (GtkGestureSwipe *gesture,
- gdouble *velocity_x,
- gdouble *velocity_y)
+ double *velocity_x,
+ double *velocity_y)
{
- gdouble vel_x, vel_y;
+ double vel_x, vel_y;
g_return_val_if_fail (GTK_IS_GESTURE (gesture), FALSE);
GDK_AVAILABLE_IN_ALL
gboolean gtk_gesture_swipe_get_velocity (GtkGestureSwipe *gesture,
- gdouble *velocity_x,
- gdouble *velocity_y);
+ double *velocity_x,
+ double *velocity_y);
G_END_DECLS
GtkGestureSingleClass parent_class;
void (* swipe) (GtkGestureSwipe *gesture,
- gdouble velocity_x,
- gdouble velocity_y);
+ double velocity_x,
+ double velocity_y);
/*< private >*/
gpointer padding[10];
struct _GtkGestureZoomPrivate
{
- gdouble initial_distance;
+ double initial_distance;
};
static guint signals[LAST_SIGNAL] = { 0 };
static gboolean
_gtk_gesture_zoom_get_distance (GtkGestureZoom *zoom,
- gdouble *distance)
+ double *distance)
{
GdkEvent *last_event;
- gdouble x1, y1, x2, y2;
+ double x1, y1, x2, y2;
GtkGesture *gesture;
GList *sequences = NULL;
- gdouble dx, dy;
+ double dx, dy;
GdkTouchpadGesturePhase phase;
gboolean retval = FALSE;
_gtk_gesture_zoom_check_emit (GtkGestureZoom *gesture)
{
GtkGestureZoomPrivate *priv;
- gdouble distance, zoom;
+ double distance, zoom;
if (!_gtk_gesture_zoom_get_distance (gesture, &distance))
return FALSE;
*
* Returns: the scale delta
**/
-gdouble
+double
gtk_gesture_zoom_get_scale_delta (GtkGestureZoom *gesture)
{
GtkGestureZoomPrivate *priv;
- gdouble distance;
+ double distance;
g_return_val_if_fail (GTK_IS_GESTURE_ZOOM (gesture), 1.0);
GtkGesture * gtk_gesture_zoom_new (void);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_gesture_zoom_get_scale_delta (GtkGestureZoom *gesture);
+double gtk_gesture_zoom_get_scale_delta (GtkGestureZoom *gesture);
G_END_DECLS
GtkGestureClass parent_class;
void (* scale_changed) (GtkGestureZoom *gesture,
- gdouble scale);
+ double scale);
/*< private >*/
gpointer padding[10];
};
_gtk_hsla_init_from_rgba (GtkHSLA *hsla,
const GdkRGBA *rgba)
{
- gdouble min;
- gdouble max;
- gdouble red;
- gdouble green;
- gdouble blue;
- gdouble delta;
+ double min;
+ double max;
+ double red;
+ double green;
+ double blue;
+ double delta;
g_return_if_fail (hsla != NULL);
g_return_if_fail (rgba != NULL);
_gdk_rgba_init_from_hsla (GdkRGBA *rgba,
const GtkHSLA *hsla)
{
- gdouble hue;
- gdouble lightness;
- gdouble saturation;
- gdouble m1, m2;
+ double hue;
+ double lightness;
+ double saturation;
+ double m1, m2;
lightness = hsla->lightness;
saturation = hsla->saturation;
{
int width;
GtkAdjustment *adj = icon_view->priv->hadjustment;
- gdouble old_page_size;
- gdouble old_upper;
- gdouble old_value;
- gdouble new_value;
- gdouble new_upper;
+ double old_page_size;
+ double old_upper;
+ double old_value;
+ double new_value;
+ double new_upper;
width = gtk_widget_get_width (GTK_WIDGET (icon_view));
GtkWidget *widget;
GtkGesture *gesture;
- gdouble press_x;
- gdouble press_y;
+ double press_x;
+ double press_y;
struct {
char *text;
static void
pressed_cb (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkIMContextWayland *context)
{
if (n_press == 1)
static void
released_cb (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkIMContextWayland *context)
{
GtkIMContextWaylandGlobal *global;
static void
click_released_cb (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkInfoBar *info_bar)
{
if (info_bar->default_response && info_bar->default_response_sensitive)
struct _GtkKineticScrolling
{
GtkKineticScrollingPhase phase;
- gdouble lower;
- gdouble upper;
- gdouble overshoot_width;
- gdouble decel_friction;
- gdouble overshoot_friction;
-
- gdouble c1;
- gdouble c2;
- gdouble equilibrium_position;
-
- gdouble t;
- gdouble position;
- gdouble velocity;
+ double lower;
+ double upper;
+ double overshoot_width;
+ double decel_friction;
+ double overshoot_friction;
+
+ double c1;
+ double c2;
+ double equilibrium_position;
+
+ double t;
+ double position;
+ double velocity;
};
static void gtk_kinetic_scrolling_init_overshoot (GtkKineticScrolling *data,
- gdouble equilibrium_position,
- gdouble initial_position,
- gdouble initial_velocity);
+ double equilibrium_position,
+ double initial_position,
+ double initial_velocity);
GtkKineticScrolling *
-gtk_kinetic_scrolling_new (gdouble lower,
- gdouble upper,
- gdouble overshoot_width,
- gdouble decel_friction,
- gdouble overshoot_friction,
- gdouble initial_position,
- gdouble initial_velocity)
+gtk_kinetic_scrolling_new (double lower,
+ double upper,
+ double overshoot_width,
+ double decel_friction,
+ double overshoot_friction,
+ double initial_position,
+ double initial_velocity)
{
GtkKineticScrolling *data;
static void
gtk_kinetic_scrolling_init_overshoot (GtkKineticScrolling *data,
- gdouble equilibrium_position,
- gdouble initial_position,
- gdouble initial_velocity)
+ double equilibrium_position,
+ double initial_position,
+ double initial_velocity)
{
data->phase = GTK_KINETIC_SCROLLING_PHASE_OVERSHOOTING;
data->equilibrium_position = equilibrium_position;
gboolean
gtk_kinetic_scrolling_tick (GtkKineticScrolling *data,
- gdouble time_delta,
- gdouble *position)
+ double time_delta,
+ double *position)
{
switch(data->phase)
{
case GTK_KINETIC_SCROLLING_PHASE_DECELERATING:
{
- gdouble last_position = data->position;
- gdouble last_time = data->t;
- gdouble exp_part;
+ double last_position = data->position;
+ double last_time = data->t;
+ double exp_part;
data->t += time_delta;
case GTK_KINETIC_SCROLLING_PHASE_OVERSHOOTING:
{
- gdouble exp_part, pos;
+ double exp_part, pos;
data->t += time_delta;
exp_part = exp(-data->overshoot_friction / 2 * data->t);
typedef struct _GtkKineticScrolling GtkKineticScrolling;
-GtkKineticScrolling * gtk_kinetic_scrolling_new (gdouble lower,
- gdouble upper,
- gdouble overshoot_width,
- gdouble decel_friction,
- gdouble overshoot_friction,
- gdouble initial_position,
- gdouble initial_velocity);
+GtkKineticScrolling * gtk_kinetic_scrolling_new (double lower,
+ double upper,
+ double overshoot_width,
+ double decel_friction,
+ double overshoot_friction,
+ double initial_position,
+ double initial_velocity);
void gtk_kinetic_scrolling_free (GtkKineticScrolling *kinetic);
gboolean gtk_kinetic_scrolling_tick (GtkKineticScrolling *data,
- gdouble time_delta,
- gdouble *position);
+ double time_delta,
+ double *position);
G_END_DECLS
int end_index);
static void gtk_label_update_active_link (GtkWidget *widget,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
static gboolean gtk_label_mnemonic_activate (GtkWidget *widget,
gboolean group_cycling);
/* Event controller callbacks */
static void gtk_label_click_gesture_pressed (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkLabel *self);
static void gtk_label_click_gesture_released (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkLabel *self);
static void gtk_label_drag_gesture_begin (GtkGestureDrag *gesture,
- gdouble start_x,
- gdouble start_y,
+ double start_x,
+ double start_y,
GtkLabel *self);
static void gtk_label_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkLabel *self);
/* Actions */
static void
gtk_label_click_gesture_pressed (GtkGestureClick *gesture,
int n_press,
- gdouble widget_x,
- gdouble widget_y,
+ double widget_x,
+ double widget_y,
GtkLabel *self)
{
GtkLabelSelectionInfo *info = self->select_info;
static void
gtk_label_click_gesture_released (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkLabel *self)
{
GtkLabelSelectionInfo *info = self->select_info;
static void
gtk_label_drag_gesture_begin (GtkGestureDrag *gesture,
- gdouble start_x,
- gdouble start_y,
+ double start_x,
+ double start_y,
GtkLabel *self)
{
GtkLabelSelectionInfo *info = self->select_info;
static void
gtk_label_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkLabel *self)
{
GtkLabelSelectionInfo *info = self->select_info;
GtkWidget *widget = GTK_WIDGET (self);
GdkEventSequence *sequence;
- gdouble x, y;
+ double x, y;
int index;
if (info == NULL || !info->selectable)
static void
gtk_label_update_active_link (GtkWidget *widget,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GtkLabel *self = GTK_LABEL (widget);
GtkLabelSelectionInfo *info = self->select_info;
typedef struct {
char *name;
- gdouble value;
+ double value;
} GtkLevelBarOffset;
struct _GtkLevelBar {
GtkLevelBarMode bar_mode;
- gdouble min_value;
- gdouble max_value;
- gdouble cur_value;
+ double min_value;
+ double max_value;
+ double cur_value;
GList *offsets;
};
static void gtk_level_bar_set_value_internal (GtkLevelBar *self,
- gdouble value);
+ double value);
static void gtk_level_bar_buildable_init (GtkBuildableIface *iface);
static GtkLevelBarOffset *
gtk_level_bar_offset_new (const char *name,
- gdouble value)
+ double value)
{
GtkLevelBarOffset *offset = g_slice_new0 (GtkLevelBarOffset);
static gboolean
gtk_level_bar_ensure_offset (GtkLevelBar *self,
const char *name,
- gdouble value)
+ double value)
{
GList *existing;
GtkLevelBarOffset *offset = NULL;
#ifndef G_DISABLE_CHECKS
static gboolean
gtk_level_bar_value_in_interval (GtkLevelBar *self,
- gdouble value)
+ double value)
{
return ((value >= self->min_value) &&
(value <= self->max_value));
int baseline)
{
GtkAllocation block_area;
- gdouble fill_percentage;
+ double fill_percentage;
gboolean inverted;
int block_min;
static void
update_level_style_classes (GtkLevelBar *self)
{
- gdouble value;
+ double value;
const char *value_class = NULL;
GtkLevelBarOffset *offset, *prev_offset;
GList *l;
* Returns: a #GtkLevelBar
*/
GtkWidget *
-gtk_level_bar_new_for_interval (gdouble min_value,
- gdouble max_value)
+gtk_level_bar_new_for_interval (double min_value,
+ double max_value)
{
return g_object_new (GTK_TYPE_LEVEL_BAR,
"min-value", min_value,
*
* Returns: a positive value
*/
-gdouble
+double
gtk_level_bar_get_min_value (GtkLevelBar *self)
{
g_return_val_if_fail (GTK_IS_LEVEL_BAR (self), 0.0);
*
* Returns: a positive value
*/
-gdouble
+double
gtk_level_bar_get_max_value (GtkLevelBar *self)
{
g_return_val_if_fail (GTK_IS_LEVEL_BAR (self), 0.0);
* Returns: a value in the interval between
* #GtkLevelBar:min-value and #GtkLevelBar:max-value
*/
-gdouble
+double
gtk_level_bar_get_value (GtkLevelBar *self)
{
g_return_val_if_fail (GTK_IS_LEVEL_BAR (self), 0.0);
static void
gtk_level_bar_set_value_internal (GtkLevelBar *self,
- gdouble value)
+ double value)
{
self->cur_value = value;
*/
void
gtk_level_bar_set_min_value (GtkLevelBar *self,
- gdouble value)
+ double value)
{
g_return_if_fail (GTK_IS_LEVEL_BAR (self));
g_return_if_fail (value >= 0.0);
*/
void
gtk_level_bar_set_max_value (GtkLevelBar *self,
- gdouble value)
+ double value)
{
g_return_if_fail (GTK_IS_LEVEL_BAR (self));
g_return_if_fail (value >= 0.0);
*/
void
gtk_level_bar_set_value (GtkLevelBar *self,
- gdouble value)
+ double value)
{
g_return_if_fail (GTK_IS_LEVEL_BAR (self));
void
gtk_level_bar_add_offset_value (GtkLevelBar *self,
const char *name,
- gdouble value)
+ double value)
{
GQuark name_quark;
gboolean
gtk_level_bar_get_offset_value (GtkLevelBar *self,
const char *name,
- gdouble *value)
+ double *value)
{
GList *existing;
GtkLevelBarOffset *offset = NULL;
GtkWidget *gtk_level_bar_new (void);
GDK_AVAILABLE_IN_ALL
-GtkWidget *gtk_level_bar_new_for_interval (gdouble min_value,
- gdouble max_value);
+GtkWidget *gtk_level_bar_new_for_interval (double min_value,
+ double max_value);
GDK_AVAILABLE_IN_ALL
void gtk_level_bar_set_mode (GtkLevelBar *self,
GDK_AVAILABLE_IN_ALL
void gtk_level_bar_set_value (GtkLevelBar *self,
- gdouble value);
+ double value);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_level_bar_get_value (GtkLevelBar *self);
+double gtk_level_bar_get_value (GtkLevelBar *self);
GDK_AVAILABLE_IN_ALL
void gtk_level_bar_set_min_value (GtkLevelBar *self,
- gdouble value);
+ double value);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_level_bar_get_min_value (GtkLevelBar *self);
+double gtk_level_bar_get_min_value (GtkLevelBar *self);
GDK_AVAILABLE_IN_ALL
void gtk_level_bar_set_max_value (GtkLevelBar *self,
- gdouble value);
+ double value);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_level_bar_get_max_value (GtkLevelBar *self);
+double gtk_level_bar_get_max_value (GtkLevelBar *self);
GDK_AVAILABLE_IN_ALL
void gtk_level_bar_set_inverted (GtkLevelBar *self,
GDK_AVAILABLE_IN_ALL
void gtk_level_bar_add_offset_value (GtkLevelBar *self,
const char *name,
- gdouble value);
+ double value);
GDK_AVAILABLE_IN_ALL
void gtk_level_bar_remove_offset_value (GtkLevelBar *self,
const char *name);
GDK_AVAILABLE_IN_ALL
gboolean gtk_level_bar_get_offset_value (GtkLevelBar *self,
const char *name,
- gdouble *value);
+ double *value);
G_END_DECLS
static void gtk_list_box_click_gesture_pressed (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkListBox *box);
static void gtk_list_box_click_gesture_released (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkListBox *box);
static void gtk_list_box_click_unpaired_release (GtkGestureClick *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
guint button,
GdkEventSequence *sequence,
GtkListBox *box);
static void
gtk_list_box_click_gesture_pressed (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkListBox *box)
{
GtkListBoxRow *row;
static void
gtk_list_box_click_unpaired_release (GtkGestureClick *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
guint button,
GdkEventSequence *sequence,
GtkListBox *box)
static void
gtk_list_box_click_gesture_released (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkListBox *box)
{
/* Take a ref to protect against reentrancy
struct _GtkMagnifierPrivate
{
GdkPaintable *paintable;
- gdouble magnification;
+ double magnification;
int x;
int y;
gboolean resize;
void
_gtk_magnifier_set_coords (GtkMagnifier *magnifier,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GtkMagnifierPrivate *priv;
void
_gtk_magnifier_get_coords (GtkMagnifier *magnifier,
- gdouble *x,
- gdouble *y)
+ double *x,
+ double *y)
{
GtkMagnifierPrivate *priv;
void
_gtk_magnifier_set_magnification (GtkMagnifier *magnifier,
- gdouble magnification)
+ double magnification)
{
GtkMagnifierPrivate *priv;
gtk_widget_queue_draw (GTK_WIDGET (magnifier));
}
-gdouble
+double
_gtk_magnifier_get_magnification (GtkMagnifier *magnifier)
{
GtkMagnifierPrivate *priv;
GtkWidget *inspected);
void _gtk_magnifier_set_coords (GtkMagnifier *magnifier,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
void _gtk_magnifier_get_coords (GtkMagnifier *magnifier,
- gdouble *x,
- gdouble *y);
+ double *x,
+ double *y);
void _gtk_magnifier_set_magnification (GtkMagnifier *magnifier,
- gdouble magnification);
-gdouble _gtk_magnifier_get_magnification (GtkMagnifier *magnifier);
+ double magnification);
+double _gtk_magnifier_get_magnification (GtkMagnifier *magnifier);
void _gtk_magnifier_set_resize (GtkMagnifier *magnifier,
gboolean resize);
# ENUM for enumeration types (int)
# FLAGS for flag enumeration types (guint)
# FLOAT for single-precision float types (float)
-# DOUBLE for double-precision float types (gdouble)
+# DOUBLE for double-precision float types (double)
# STRING for string types (char *)
# BOXED for boxed (anonymous but reference counted) types (GBoxed*)
# POINTER for anonymous pointer types (gpointer)
static gboolean
in_tabs (GtkNotebook *notebook,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
graphene_rect_t tabs_bounds;
static GList*
get_tab_at_pos (GtkNotebook *notebook,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GtkNotebookPage *page;
GList *children;
static void
gtk_pad_controller_activate_action_with_axis (GtkPadController *controller,
const ActionEntryData *entry,
- gdouble value)
+ double value)
{
g_action_group_activate_action (controller->action_group,
entry->action_name,
const ActionEntryData *entry;
GtkPadActionType type;
guint index, mode, group;
- gdouble value = 0;
+ double value = 0;
gdk_pad_event_get_group_mode (event, &group, &mode);
if (event_type == GDK_PAD_GROUP_MODE)
*
* Returns: the top margin
*/
-gdouble
+double
gtk_page_setup_get_top_margin (GtkPageSetup *setup,
GtkUnit unit)
{
*/
void
gtk_page_setup_set_top_margin (GtkPageSetup *setup,
- gdouble margin,
+ double margin,
GtkUnit unit)
{
setup->top_margin = _gtk_print_convert_to_mm (margin, unit);
*
* Returns: the bottom margin
*/
-gdouble
+double
gtk_page_setup_get_bottom_margin (GtkPageSetup *setup,
GtkUnit unit)
{
*/
void
gtk_page_setup_set_bottom_margin (GtkPageSetup *setup,
- gdouble margin,
+ double margin,
GtkUnit unit)
{
setup->bottom_margin = _gtk_print_convert_to_mm (margin, unit);
*
* Returns: the left margin
*/
-gdouble
+double
gtk_page_setup_get_left_margin (GtkPageSetup *setup,
GtkUnit unit)
{
*/
void
gtk_page_setup_set_left_margin (GtkPageSetup *setup,
- gdouble margin,
+ double margin,
GtkUnit unit)
{
setup->left_margin = _gtk_print_convert_to_mm (margin, unit);
*
* Returns: the right margin
*/
-gdouble
+double
gtk_page_setup_get_right_margin (GtkPageSetup *setup,
GtkUnit unit)
{
*/
void
gtk_page_setup_set_right_margin (GtkPageSetup *setup,
- gdouble margin,
+ double margin,
GtkUnit unit)
{
setup->right_margin = _gtk_print_convert_to_mm (margin, unit);
*
* Returns: the paper width.
*/
-gdouble
+double
gtk_page_setup_get_paper_width (GtkPageSetup *setup,
GtkUnit unit)
{
*
* Returns: the paper height.
*/
-gdouble
+double
gtk_page_setup_get_paper_height (GtkPageSetup *setup,
GtkUnit unit)
{
*
* Returns: the page width.
*/
-gdouble
+double
gtk_page_setup_get_page_width (GtkPageSetup *setup,
GtkUnit unit)
{
- gdouble width;
+ double width;
width = gtk_page_setup_get_paper_width (setup, GTK_UNIT_MM);
if (setup->orientation == GTK_PAGE_ORIENTATION_PORTRAIT ||
*
* Returns: the page height.
*/
-gdouble
+double
gtk_page_setup_get_page_height (GtkPageSetup *setup,
GtkUnit unit)
{
- gdouble height;
+ double height;
height = gtk_page_setup_get_paper_height (setup, GTK_UNIT_MM);
if (setup->orientation == GTK_PAGE_ORIENTATION_PORTRAIT ||
GError **error)
{
GtkPaperSize *paper_size;
- gdouble top, bottom, left, right;
+ double top, bottom, left, right;
char *orientation = NULL, *freeme = NULL;
gboolean retval = FALSE;
GError *err = NULL;
{
GtkPageSetup *setup;
const char *orientation;
- gdouble margin;
+ double margin;
GtkPaperSize *paper_size;
g_return_val_if_fail (g_variant_is_of_type (variant, G_VARIANT_TYPE_VARDICT), NULL);
void gtk_page_setup_set_paper_size (GtkPageSetup *setup,
GtkPaperSize *size);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_page_setup_get_top_margin (GtkPageSetup *setup,
+double gtk_page_setup_get_top_margin (GtkPageSetup *setup,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
void gtk_page_setup_set_top_margin (GtkPageSetup *setup,
- gdouble margin,
+ double margin,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_page_setup_get_bottom_margin (GtkPageSetup *setup,
+double gtk_page_setup_get_bottom_margin (GtkPageSetup *setup,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
void gtk_page_setup_set_bottom_margin (GtkPageSetup *setup,
- gdouble margin,
+ double margin,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_page_setup_get_left_margin (GtkPageSetup *setup,
+double gtk_page_setup_get_left_margin (GtkPageSetup *setup,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
void gtk_page_setup_set_left_margin (GtkPageSetup *setup,
- gdouble margin,
+ double margin,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_page_setup_get_right_margin (GtkPageSetup *setup,
+double gtk_page_setup_get_right_margin (GtkPageSetup *setup,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
void gtk_page_setup_set_right_margin (GtkPageSetup *setup,
- gdouble margin,
+ double margin,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
/* These take orientation, but not margins into consideration */
GDK_AVAILABLE_IN_ALL
-gdouble gtk_page_setup_get_paper_width (GtkPageSetup *setup,
+double gtk_page_setup_get_paper_width (GtkPageSetup *setup,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_page_setup_get_paper_height (GtkPageSetup *setup,
+double gtk_page_setup_get_paper_height (GtkPageSetup *setup,
GtkUnit unit);
/* These take orientation, and margins into consideration */
GDK_AVAILABLE_IN_ALL
-gdouble gtk_page_setup_get_page_width (GtkPageSetup *setup,
+double gtk_page_setup_get_page_width (GtkPageSetup *setup,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_page_setup_get_page_height (GtkPageSetup *setup,
+double gtk_page_setup_get_page_height (GtkPageSetup *setup,
GtkUnit unit);
/* Saving and restoring page setup */
after the decimal point, and not to many such digits if they
are nonzero. I wish printf let you specify max precision for %f... */
static char *
-double_to_string (gdouble d,
+double_to_string (double d,
GtkUnit unit)
{
char *val, *p;
static gboolean
initiates_touch_drag (GtkPaned *paned,
- gdouble start_x,
- gdouble start_y)
+ double start_x,
+ double start_y)
{
int handle_size, handle_pos, drag_pos;
graphene_rect_t handle_area;
static void
gesture_drag_begin_cb (GtkGestureDrag *gesture,
- gdouble start_x,
- gdouble start_y,
+ double start_x,
+ double start_y,
GtkPaned *paned)
{
GdkEventSequence *sequence;
static void
gesture_drag_update_cb (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkPaned *paned)
{
- gdouble start_x, start_y;
+ double start_x, start_y;
gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture),
&start_x, &start_y);
static void
gesture_drag_end_cb (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkPaned *paned)
{
if (!paned->panning)
else if (!paned->resize_start_child && paned->resize_end_child)
pos = start_child_req;
else if (start_child_req + end_child_req != 0)
- pos = allocation * ((gdouble)start_child_req / (start_child_req + end_child_req)) + 0.5;
+ pos = allocation * ((double)start_child_req / (start_child_req + end_child_req)) + 0.5;
else
pos = allocation * 0.5 + 0.5;
}
if (paned->resize_start_child && !paned->resize_end_child)
pos = paned->start_child_size + allocation - paned->last_allocation;
else if (!(!paned->resize_start_child && paned->resize_end_child))
- pos = allocation * ((gdouble) paned->start_child_size / (paned->last_allocation)) + 0.5;
+ pos = allocation * ((double) paned->start_child_size / (paned->last_allocation)) + 0.5;
else
pos = paned->start_child_size;
}
char *display_name;
char *ppd_name;
- gdouble width, height; /* Stored in mm */
+ double width, height; /* Stored in mm */
gboolean is_custom;
gboolean is_ipp;
};
static gboolean
parse_media_size (const char *size,
- gdouble *width_mm,
- gdouble *height_mm)
+ double *width_mm,
+ double *height_mm)
{
const char *p;
char *e;
static gboolean
parse_full_media_size_name (const char *full_name,
char **name,
- gdouble *width_mm,
- gdouble *height_mm)
+ double *width_mm,
+ double *height_mm)
{
const char *p;
const char *end_of_name;
GtkPaperSize *
gtk_paper_size_new_from_ppd (const char *ppd_name,
const char *ppd_display_name,
- gdouble width,
- gdouble height)
+ double width,
+ double height)
{
char *name;
const char *lookup_ppd_name;
*/
GtkPaperSize *
gtk_paper_size_new_from_ipp (const char *ipp_name,
- gdouble width,
- gdouble height)
+ double width,
+ double height)
{
GtkPaperSize *size;
const char *name = NULL;
GtkPaperSize *
gtk_paper_size_new_custom (const char *name,
const char *display_name,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GtkUnit unit)
{
GtkPaperSize *size;
*
* Returns: the paper width
*/
-gdouble
+double
gtk_paper_size_get_width (GtkPaperSize *size,
GtkUnit unit)
{
*
* Returns: the paper height
*/
-gdouble
+double
gtk_paper_size_get_height (GtkPaperSize *size,
GtkUnit unit)
{
*/
void
gtk_paper_size_set_size (GtkPaperSize *size,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GtkUnit unit)
{
g_return_if_fail (size != NULL);
*
* Returns: the default top margin
*/
-gdouble
+double
gtk_paper_size_get_default_top_margin (GtkPaperSize *size,
GtkUnit unit)
{
- gdouble margin;
+ double margin;
margin = _gtk_print_convert_to_mm (0.25, GTK_UNIT_INCH);
return _gtk_print_convert_from_mm (margin, unit);
*
* Returns: the default bottom margin
*/
-gdouble
+double
gtk_paper_size_get_default_bottom_margin (GtkPaperSize *size,
GtkUnit unit)
{
- gdouble margin;
+ double margin;
const char *name;
margin = _gtk_print_convert_to_mm (0.25, GTK_UNIT_INCH);
*
* Returns: the default left margin
*/
-gdouble
+double
gtk_paper_size_get_default_left_margin (GtkPaperSize *size,
GtkUnit unit)
{
- gdouble margin;
+ double margin;
margin = _gtk_print_convert_to_mm (0.25, GTK_UNIT_INCH);
return _gtk_print_convert_from_mm (margin, unit);
*
* Returns: the default right margin
*/
-gdouble
+double
gtk_paper_size_get_default_right_margin (GtkPaperSize *size,
GtkUnit unit)
{
- gdouble margin;
+ double margin;
margin = _gtk_print_convert_to_mm (0.25, GTK_UNIT_INCH);
return _gtk_print_convert_from_mm (margin, unit);
char *ppd_name = NULL;
char *display_name = NULL;
char *freeme = NULL;
- gdouble width, height;
+ double width, height;
GError *err = NULL;
g_return_val_if_fail (key_file != NULL, NULL);
const char *name;
const char *ppd_name;
const char *display_name;
- gdouble width, height;
+ double width, height;
g_return_val_if_fail (g_variant_is_of_type (variant, G_VARIANT_TYPE_VARDICT), NULL);
GDK_AVAILABLE_IN_ALL
GtkPaperSize *gtk_paper_size_new_from_ppd (const char *ppd_name,
const char *ppd_display_name,
- gdouble width,
- gdouble height);
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
GtkPaperSize *gtk_paper_size_new_from_ipp (const char *ipp_name,
- gdouble width,
- gdouble height);
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
GtkPaperSize *gtk_paper_size_new_custom (const char *name,
const char *display_name,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
GtkPaperSize *gtk_paper_size_copy (GtkPaperSize *other);
const char *gtk_paper_size_get_ppd_name (GtkPaperSize *size);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_paper_size_get_width (GtkPaperSize *size, GtkUnit unit);
+double gtk_paper_size_get_width (GtkPaperSize *size, GtkUnit unit);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_paper_size_get_height (GtkPaperSize *size, GtkUnit unit);
+double gtk_paper_size_get_height (GtkPaperSize *size, GtkUnit unit);
GDK_AVAILABLE_IN_ALL
gboolean gtk_paper_size_is_custom (GtkPaperSize *size);
GDK_AVAILABLE_IN_ALL
/* Only for custom sizes: */
GDK_AVAILABLE_IN_ALL
void gtk_paper_size_set_size (GtkPaperSize *size,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_paper_size_get_default_top_margin (GtkPaperSize *size,
+double gtk_paper_size_get_default_top_margin (GtkPaperSize *size,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_paper_size_get_default_bottom_margin (GtkPaperSize *size,
+double gtk_paper_size_get_default_bottom_margin (GtkPaperSize *size,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_paper_size_get_default_left_margin (GtkPaperSize *size,
+double gtk_paper_size_get_default_left_margin (GtkPaperSize *size,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_paper_size_get_default_right_margin (GtkPaperSize *size,
+double gtk_paper_size_get_default_right_margin (GtkPaperSize *size,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
gboolean current_dir);
static gboolean gtk_path_bar_scroll_controller_scroll (GtkEventControllerScroll *scroll,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkPathBar *path_bar);
static void
static gboolean
gtk_path_bar_scroll_controller_scroll (GtkEventControllerScroll *scroll,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkPathBar *path_bar)
{
if (dy > 0)
gboolean *show_eject);
static void on_row_pressed (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkSidebarRow *row);
static void on_row_released (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkSidebarRow *row);
static void on_row_dragged (GtkGestureDrag *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkSidebarRow *row);
static void popup_menu_cb (GtkSidebarRow *row);
static void long_press_cb (GtkGesture *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkPlacesSidebar *sidebar);
static void stop_drop_feedback (GtkPlacesSidebar *sidebar);
static GMountOperation * get_mount_operation (GtkPlacesSidebar *sidebar);
static void
on_row_pressed (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkSidebarRow *row)
{
GtkPlacesSidebar *sidebar;
static void
on_row_released (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkSidebarRow *row)
{
GtkPlacesSidebar *sidebar;
static void
on_row_dragged (GtkGestureDrag *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkSidebarRow *row)
{
GtkPlacesSidebar *sidebar;
static void
long_press_cb (GtkGesture *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkPlacesSidebar *sidebar)
{
GtkWidget *row;
GtkWidget *widget,
GdkDevice *device,
GdkEventSequence *sequence,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GtkPointerFocus *focus;
void
gtk_pointer_focus_set_coordinates (GtkPointerFocus *focus,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
focus->x = x;
focus->y = y;
GtkWindow *toplevel;
GtkWidget *target; /* Unaffected by the implicit grab */
GtkWidget *grab_widget;
- gdouble x, y; /* In toplevel coordinates */
+ double x, y; /* In toplevel coordinates */
};
GtkPointerFocus * gtk_pointer_focus_new (GtkWindow *toplevel,
GtkWidget *widget,
GdkDevice *device,
GdkEventSequence *sequence,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
GtkPointerFocus * gtk_pointer_focus_ref (GtkPointerFocus *focus);
void gtk_pointer_focus_unref (GtkPointerFocus *focus);
void gtk_pointer_focus_set_coordinates (GtkPointerFocus *focus,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
void gtk_pointer_focus_set_target (GtkPointerFocus *focus,
GtkWidget *target);
GtkWidget * gtk_pointer_focus_get_target (GtkPointerFocus *focus);
static gboolean fallback_printer_mark_conflicts (GtkPrinter *printer,
GtkPrinterOptionSet *options);
static gboolean fallback_printer_get_hard_margins (GtkPrinter *printer,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right);
+ double *top,
+ double *bottom,
+ double *left,
+ double *right);
static gboolean fallback_printer_get_hard_margins_for_paper_size (GtkPrinter *printer,
GtkPaperSize *paper_size,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right);
+ double *top,
+ double *bottom,
+ double *left,
+ double *right);
static GList * fallback_printer_list_papers (GtkPrinter *printer);
static GtkPageSetup * fallback_printer_get_default_page_size (GtkPrinter *printer);
static GtkPrintCapabilities fallback_printer_get_capabilities (GtkPrinter *printer);
static gboolean
fallback_printer_get_hard_margins (GtkPrinter *printer,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right)
+ double *top,
+ double *bottom,
+ double *left,
+ double *right)
{
return FALSE;
}
static gboolean
fallback_printer_get_hard_margins_for_paper_size (GtkPrinter *printer,
GtkPaperSize *paper_size,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right)
+ double *top,
+ double *bottom,
+ double *left,
+ double *right)
{
return FALSE;
}
void (*printer_request_details) (GtkPrinter *printer);
cairo_surface_t * (*printer_create_cairo_surface) (GtkPrinter *printer,
GtkPrintSettings *settings,
- gdouble height,
- gdouble width,
+ double height,
+ double width,
GIOChannel *cache_io);
GtkPrinterOptionSet * (*printer_get_options) (GtkPrinter *printer,
GtkPrintSettings *settings,
GList * (*printer_list_papers) (GtkPrinter *printer);
GtkPageSetup * (*printer_get_default_page_size) (GtkPrinter *printer);
gboolean (*printer_get_hard_margins) (GtkPrinter *printer,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right);
+ double *top,
+ double *bottom,
+ double *left,
+ double *right);
GtkPrintCapabilities (*printer_get_capabilities) (GtkPrinter *printer);
/* Signals */
gboolean (*printer_get_hard_margins_for_paper_size) (GtkPrinter *printer,
GtkPaperSize *paper_size,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right);
+ double *top,
+ double *bottom,
+ double *left,
+ double *right);
};
#define GTK_PRINT_BACKEND_EXTENSION_POINT_NAME "gtk-print-backend"
cairo_t *cr;
GtkPageSetup *page_setup;
- gdouble surface_dpi_x;
- gdouble surface_dpi_y;
+ double surface_dpi_x;
+ double surface_dpi_y;
- gdouble pixels_per_unit_x;
- gdouble pixels_per_unit_y;
+ double pixels_per_unit_x;
+ double pixels_per_unit_y;
gboolean has_hard_margins;
- gdouble hard_margin_top;
- gdouble hard_margin_bottom;
- gdouble hard_margin_left;
- gdouble hard_margin_right;
+ double hard_margin_top;
+ double hard_margin_bottom;
+ double hard_margin_left;
+ double hard_margin_right;
};
cairo_t *cr = context->cr;
cairo_matrix_t matrix;
GtkPaperSize *paper_size;
- gdouble width, height;
+ double width, height;
paper_size = gtk_page_setup_get_paper_size (context->page_setup);
{
cairo_t *cr = context->cr;
cairo_matrix_t matrix;
- gdouble width, height;
+ double width, height;
width = gtk_page_setup_get_paper_width (context->page_setup, GTK_UNIT_INCH);
width = width * context->surface_dpi_x / context->pixels_per_unit_x;
void
_gtk_print_context_translate_into_margin (GtkPrintContext *context)
{
- gdouble dx, dy;
+ double dx, dy;
g_return_if_fail (GTK_IS_PRINT_CONTEXT (context));
*
* Returns: the width of @context
*/
-gdouble
+double
gtk_print_context_get_width (GtkPrintContext *context)
{
GtkPrintOperationPrivate *priv;
- gdouble width;
+ double width;
g_return_val_if_fail (GTK_IS_PRINT_CONTEXT (context), 0);
*
* Returns: the height of @context
*/
-gdouble
+double
gtk_print_context_get_height (GtkPrintContext *context)
{
GtkPrintOperationPrivate *priv;
- gdouble height;
+ double height;
g_return_val_if_fail (GTK_IS_PRINT_CONTEXT (context), 0);
*
* Returns: the horizontal resolution of @context
*/
-gdouble
+double
gtk_print_context_get_dpi_x (GtkPrintContext *context)
{
g_return_val_if_fail (GTK_IS_PRINT_CONTEXT (context), 0);
*
* Returns: the vertical resolution of @context
*/
-gdouble
+double
gtk_print_context_get_dpi_y (GtkPrintContext *context)
{
g_return_val_if_fail (GTK_IS_PRINT_CONTEXT (context), 0);
*/
gboolean
gtk_print_context_get_hard_margins (GtkPrintContext *context,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right)
+ double *top,
+ double *bottom,
+ double *left,
+ double *right)
{
if (context->has_hard_margins)
{
*/
void
_gtk_print_context_set_hard_margins (GtkPrintContext *context,
- gdouble top,
- gdouble bottom,
- gdouble left,
- gdouble right)
+ double top,
+ double bottom,
+ double left,
+ double right)
{
context->hard_margin_top = top;
context->hard_margin_bottom = bottom;
GDK_AVAILABLE_IN_ALL
GtkPageSetup *gtk_print_context_get_page_setup (GtkPrintContext *context);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_print_context_get_width (GtkPrintContext *context);
+double gtk_print_context_get_width (GtkPrintContext *context);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_print_context_get_height (GtkPrintContext *context);
+double gtk_print_context_get_height (GtkPrintContext *context);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_print_context_get_dpi_x (GtkPrintContext *context);
+double gtk_print_context_get_dpi_x (GtkPrintContext *context);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_print_context_get_dpi_y (GtkPrintContext *context);
+double gtk_print_context_get_dpi_y (GtkPrintContext *context);
GDK_AVAILABLE_IN_ALL
gboolean gtk_print_context_get_hard_margins (GtkPrintContext *context,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right);
+ double *top,
+ double *bottom,
+ double *left,
+ double *right);
/* Fonts */
GDK_AVAILABLE_IN_ALL
cairo_surface_t *
_gtk_printer_create_cairo_surface (GtkPrinter *printer,
GtkPrintSettings *settings,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GIOChannel *cache_io)
{
GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer);
*/
gboolean
gtk_printer_get_hard_margins (GtkPrinter *printer,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right)
+ double *top,
+ double *bottom,
+ double *left,
+ double *right)
{
GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer);
GtkPrintBackendClass *backend_class = GTK_PRINT_BACKEND_GET_CLASS (priv->backend);
gboolean
gtk_printer_get_hard_margins_for_paper_size (GtkPrinter *printer,
GtkPaperSize *paper_size,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right)
+ double *top,
+ double *bottom,
+ double *left,
+ double *right)
{
GtkPrinterPrivate *priv = gtk_printer_get_instance_private (printer);
GtkPrintBackendClass *backend_class = GTK_PRINT_BACKEND_GET_CLASS (priv->backend);
GtkPrintCapabilities gtk_printer_get_capabilities (GtkPrinter *printer);
GDK_AVAILABLE_IN_ALL
gboolean gtk_printer_get_hard_margins (GtkPrinter *printer,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right);
+ double *top,
+ double *bottom,
+ double *left,
+ double *right);
GDK_AVAILABLE_IN_ALL
gboolean gtk_printer_get_hard_margins_for_paper_size (GtkPrinter *printer,
GtkPaperSize *paper_size,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right);
+ double *top,
+ double *bottom,
+ double *left,
+ double *right);
/**
* GtkPrinterFunc:
GtkPageSetup *page_setup);
cairo_surface_t * _gtk_printer_create_cairo_surface (GtkPrinter *printer,
GtkPrintSettings *settings,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GIOChannel *cache_io);
GHashTable * _gtk_printer_get_custom_widgets (GtkPrinter *printer);
int num_page_ranges;
GtkPageSet page_set;
int num_copies;
- gdouble scale;
+ double scale;
guint number_up;
GtkNumberUpLayout number_up_layout;
GError **error)
{
char *filename = NULL;
- gdouble width, height;
+ double width, height;
GtkPaperSize *paper_size;
int fd;
GError *tmp_error;
*
* Returns: the scale
*/
-gdouble
+double
gtk_print_job_get_scale (GtkPrintJob *job)
{
*/
void
gtk_print_job_set_scale (GtkPrintJob *job,
- gdouble scale)
+ double scale)
{
job->scale = scale;
}
void gtk_print_job_set_num_copies (GtkPrintJob *job,
int num_copies);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_print_job_get_scale (GtkPrintJob *job);
+double gtk_print_job_get_scale (GtkPrintJob *job);
GDK_AVAILABLE_IN_ALL
void gtk_print_job_set_scale (GtkPrintJob *job,
- gdouble scale);
+ double scale);
GDK_AVAILABLE_IN_ALL
guint gtk_print_job_get_n_up (GtkPrintJob *job);
GDK_AVAILABLE_IN_ALL
GtkPrintOperationPortal *op_portal = op->priv->platform_data;
GtkPaperSize *paper_size;
cairo_surface_type_t type;
- gdouble w, h;
+ double w, h;
paper_size = gtk_page_setup_get_paper_size (page_setup);
const char *filename);
cairo_surface_t * _gtk_print_operation_platform_backend_create_preview_surface (GtkPrintOperation *op,
GtkPageSetup *page_setup,
- gdouble *dpi_x,
- gdouble *dpi_y,
+ double *dpi_x,
+ double *dpi_y,
char **target);
void _gtk_print_operation_platform_backend_resize_preview_surface (GtkPrintOperation *op,
GtkPageSetup *page_setup,
void _gtk_print_context_rotate_according_to_orientation (GtkPrintContext *context);
void _gtk_print_context_reverse_according_to_orientation (GtkPrintContext *context);
void _gtk_print_context_set_hard_margins (GtkPrintContext *context,
- gdouble top,
- gdouble bottom,
- gdouble left,
- gdouble right);
+ double top,
+ double bottom,
+ double left,
+ double right);
G_END_DECLS
GtkPrintOperationUnix *op_unix;
GtkPaperSize *paper_size;
cairo_surface_type_t type;
- gdouble w, h;
+ double w, h;
op_unix = op->priv->platform_data;
GtkPrintOperation *op = rdata->op;
GtkPrintOperationPrivate *priv = op->priv;
GtkPrintJob *job;
- gdouble top, bottom, left, right;
+ double top, bottom, left, right;
if (rdata->do_print)
{
static cairo_surface_t *
gtk_print_operation_unix_create_preview_surface (GtkPrintOperation *op,
GtkPageSetup *page_setup,
- gdouble *dpi_x,
- gdouble *dpi_y,
+ double *dpi_x,
+ double *dpi_y,
char **target)
{
char *filename;
int fd;
GtkPaperSize *paper_size;
- gdouble w, h;
+ double w, h;
cairo_surface_t *surface;
static cairo_user_data_key_t key;
GtkPageSetup *page_setup,
cairo_surface_t *surface)
{
- gdouble w, h;
+ double w, h;
w = gtk_page_setup_get_paper_width (page_setup, GTK_UNIT_POINTS);
h = gtk_page_setup_get_paper_height (page_setup, GTK_UNIT_POINTS);
cairo_surface_t *
_gtk_print_operation_platform_backend_create_preview_surface (GtkPrintOperation *op,
GtkPageSetup *page_setup,
- gdouble *dpi_x,
- gdouble *dpi_y,
+ double *dpi_x,
+ double *dpi_y,
char **target)
{
return gtk_print_operation_unix_create_preview_surface (op, page_setup, dpi_x, dpi_y, target);
cairo_surface_t *
_gtk_print_operation_platform_backend_create_preview_surface (GtkPrintOperation *op,
GtkPageSetup *page_setup,
- gdouble *dpi_x,
- gdouble *dpi_y,
+ double *dpi_x,
+ double *dpi_y,
char **target)
{
GtkPaperSize *paper_size;
GtkPrintContext *context,
GtkWindow *parent)
{
- gdouble dpi_x, dpi_y;
+ double dpi_x, dpi_y;
PreviewOp *pop;
GtkPageSetup *page_setup;
cairo_t *cr;
* {
* cairo_t *cr;
* PangoLayout *layout;
- * gdouble width, text_height;
+ * double width, text_height;
* int layout_height;
* PangoFontDescription *desc;
*
* pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
*
* pango_layout_get_size (layout, NULL, &layout_height);
- * text_height = (gdouble)layout_height / PANGO_SCALE;
+ * text_height = (double)layout_height / PANGO_SCALE;
*
* cairo_move_to (cr, width / 2, (HEADER_HEIGHT - text_height) / 2);
* pango_cairo_show_layout (cr, layout);
GtkPageSetup *page_setup)
{
cairo_surface_t *surface = op->priv->platform_data;
- gdouble w, h;
+ double w, h;
w = gtk_page_setup_get_paper_width (page_setup, GTK_UNIT_POINTS);
h = gtk_page_setup_get_paper_height (page_setup, GTK_UNIT_POINTS);
GtkPageSetup *page_setup;
cairo_surface_t *surface;
cairo_t *cr;
- gdouble width, height;
+ double width, height;
priv->print_context = _gtk_print_context_new (op);
else
{
GtkPageOrientation orientation;
- gdouble paper_width, paper_height;
- gdouble page_width, page_height;
- gdouble context_width, context_height;
- gdouble bottom_margin, top_margin, left_margin, right_margin;
- gdouble x_step, y_step;
- gdouble x_scale, y_scale, scale;
- gdouble horizontal_offset = 0.0, vertical_offset = 0.0;
+ double paper_width, paper_height;
+ double page_width, page_height;
+ double context_width, context_height;
+ double bottom_margin, top_margin, left_margin, right_margin;
+ double x_step, y_step;
+ double x_scale, y_scale, scale;
+ double horizontal_offset = 0.0, vertical_offset = 0.0;
int columns, rows, x, y, tmp_length;
page_setup = gtk_print_context_get_page_setup (print_context);
*
* Returns: the floating point number associated with @key
*/
-gdouble
+double
gtk_print_settings_get_double_with_default (GtkPrintSettings *settings,
const char *key,
- gdouble def)
+ double def)
{
const char *val;
*
* Returns: the double value of @key
*/
-gdouble
+double
gtk_print_settings_get_double (GtkPrintSettings *settings,
const char *key)
{
void
gtk_print_settings_set_double (GtkPrintSettings *settings,
const char *key,
- gdouble value)
+ double value)
{
char buf[G_ASCII_DTOSTR_BUF_SIZE];
*
* Returns: the length value of @key, converted to @unit
*/
-gdouble
+double
gtk_print_settings_get_length (GtkPrintSettings *settings,
const char *key,
GtkUnit unit)
{
- gdouble length = gtk_print_settings_get_double (settings, key);
+ double length = gtk_print_settings_get_double (settings, key);
return _gtk_print_convert_from_mm (length, unit);
}
void
gtk_print_settings_set_length (GtkPrintSettings *settings,
const char *key,
- gdouble value,
+ double value,
GtkUnit unit)
{
gtk_print_settings_set_double (settings, key,
{
const char *val;
const char *name;
- gdouble w, h;
+ double w, h;
val = gtk_print_settings_get (settings, GTK_PRINT_SETTINGS_PAPER_FORMAT);
if (val == NULL)
*
* Returns: the paper width, in units of @unit
*/
-gdouble
+double
gtk_print_settings_get_paper_width (GtkPrintSettings *settings,
GtkUnit unit)
{
*/
void
gtk_print_settings_set_paper_width (GtkPrintSettings *settings,
- gdouble width,
+ double width,
GtkUnit unit)
{
gtk_print_settings_set_length (settings, GTK_PRINT_SETTINGS_PAPER_WIDTH, width, unit);
*
* Returns: the paper height, in units of @unit
*/
-gdouble
+double
gtk_print_settings_get_paper_height (GtkPrintSettings *settings,
GtkUnit unit)
{
*/
void
gtk_print_settings_set_paper_height (GtkPrintSettings *settings,
- gdouble height,
+ double height,
GtkUnit unit)
{
gtk_print_settings_set_length (settings,
*
* Returns: the resolution in lpi (lines per inch)
*/
-gdouble
+double
gtk_print_settings_get_printer_lpi (GtkPrintSettings *settings)
{
return gtk_print_settings_get_double_with_default (settings, GTK_PRINT_SETTINGS_PRINTER_LPI, 150.0);
*/
void
gtk_print_settings_set_printer_lpi (GtkPrintSettings *settings,
- gdouble lpi)
+ double lpi)
{
gtk_print_settings_set_double (settings, GTK_PRINT_SETTINGS_PRINTER_LPI,
lpi);
*
* Returns: the scale in percent
*/
-gdouble
+double
gtk_print_settings_get_scale (GtkPrintSettings *settings)
{
return gtk_print_settings_get_double_with_default (settings,
*/
void
gtk_print_settings_set_scale (GtkPrintSettings *settings,
- gdouble scale)
+ double scale)
{
gtk_print_settings_set_double (settings, GTK_PRINT_SETTINGS_SCALE,
scale);
const char *key,
gboolean value);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_print_settings_get_double (GtkPrintSettings *settings,
+double gtk_print_settings_get_double (GtkPrintSettings *settings,
const char *key);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_print_settings_get_double_with_default (GtkPrintSettings *settings,
+double gtk_print_settings_get_double_with_default (GtkPrintSettings *settings,
const char *key,
- gdouble def);
+ double def);
GDK_AVAILABLE_IN_ALL
void gtk_print_settings_set_double (GtkPrintSettings *settings,
const char *key,
- gdouble value);
+ double value);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_print_settings_get_length (GtkPrintSettings *settings,
+double gtk_print_settings_get_length (GtkPrintSettings *settings,
const char *key,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
void gtk_print_settings_set_length (GtkPrintSettings *settings,
const char *key,
- gdouble value,
+ double value,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
int gtk_print_settings_get_int (GtkPrintSettings *settings,
void gtk_print_settings_set_paper_size (GtkPrintSettings *settings,
GtkPaperSize *paper_size);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_print_settings_get_paper_width (GtkPrintSettings *settings,
+double gtk_print_settings_get_paper_width (GtkPrintSettings *settings,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
void gtk_print_settings_set_paper_width (GtkPrintSettings *settings,
- gdouble width,
+ double width,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_print_settings_get_paper_height (GtkPrintSettings *settings,
+double gtk_print_settings_get_paper_height (GtkPrintSettings *settings,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
void gtk_print_settings_set_paper_height (GtkPrintSettings *settings,
- gdouble height,
+ double height,
GtkUnit unit);
GDK_AVAILABLE_IN_ALL
gboolean gtk_print_settings_get_use_color (GtkPrintSettings *settings);
int resolution_x,
int resolution_y);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_print_settings_get_printer_lpi (GtkPrintSettings *settings);
+double gtk_print_settings_get_printer_lpi (GtkPrintSettings *settings);
GDK_AVAILABLE_IN_ALL
void gtk_print_settings_set_printer_lpi (GtkPrintSettings *settings,
- gdouble lpi);
+ double lpi);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_print_settings_get_scale (GtkPrintSettings *settings);
+double gtk_print_settings_get_scale (GtkPrintSettings *settings);
GDK_AVAILABLE_IN_ALL
void gtk_print_settings_set_scale (GtkPrintSettings *settings,
- gdouble scale);
+ double scale);
GDK_AVAILABLE_IN_ALL
GtkPrintPages gtk_print_settings_get_print_pages (GtkPrintSettings *settings);
GDK_AVAILABLE_IN_ALL
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->all_pages_radio), TRUE);
}
-static gdouble
+static double
dialog_get_scale (GtkPrintUnixDialog *dialog)
{
if (gtk_widget_is_sensitive (dialog->scale_spin))
static void
dialog_set_scale (GtkPrintUnixDialog *dialog,
- gdouble val)
+ double val)
{
gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->scale_spin), val);
}
GtkWidget *widget = GTK_WIDGET (da);
GtkPrintUnixDialog *dialog = GTK_PRINT_UNIX_DIALOG (data);
GtkStyleContext *context;
- gdouble ratio;
+ double ratio;
int w, h, tmp;
int pages_x, pages_y, i, x, y, layout_w, layout_h;
- gdouble page_width, page_height;
+ double page_width, page_height;
GtkPageOrientation orientation;
gboolean landscape;
PangoLayout *layout;
int dx, dy;
gboolean horizontal;
GtkPageSetup *page_setup;
- gdouble paper_width, paper_height;
- gdouble pos_x, pos_y;
+ double paper_width, paper_height;
+ double pos_x, pos_y;
int pages_per_sheet;
gboolean ltr = TRUE;
i = 1;
- page_width = (gdouble)w / pages_x;
- page_height = (gdouble)h / pages_y;
+ page_width = (double)w / pages_x;
+ page_height = (double)h / pages_y;
layout = pango_cairo_create_layout (cr);
#include "config.h"
#include "gtkprintutils.h"
-gdouble
-_gtk_print_convert_to_mm (gdouble len,
+double
+_gtk_print_convert_to_mm (double len,
GtkUnit unit)
{
switch (unit)
}
}
-gdouble
-_gtk_print_convert_from_mm (gdouble len,
+double
+_gtk_print_convert_from_mm (double len,
GtkUnit unit)
{
switch (unit)
#define MM_PER_INCH 25.4
#define POINTS_PER_INCH 72
-gdouble _gtk_print_convert_to_mm (gdouble len, GtkUnit unit);
-gdouble _gtk_print_convert_from_mm (gdouble len, GtkUnit unit);
+double _gtk_print_convert_to_mm (double len, GtkUnit unit);
+double _gtk_print_convert_from_mm (double len, GtkUnit unit);
G_END_DECLS
void check_crossing_invariants (GtkWidget *widget,
GtkCrossingData *crossing);
-gdouble _gtk_get_slowdown (void);
-void _gtk_set_slowdown (gdouble slowdown_factor);
+double _gtk_get_slowdown (void);
+void _gtk_set_slowdown (double slowdown_factor);
char *gtk_get_portal_request_path (GDBusConnection *connection,
char **token);
GtkWidget *trough_widget;
GtkWidget *progress_widget;
- gdouble fraction;
- gdouble pulse_fraction;
+ double fraction;
+ double pulse_fraction;
double activity_pos;
guint activity_blocks;
GtkProgressTracker tracker;
gint64 pulse1;
gint64 pulse2;
- gdouble last_iteration;
+ double last_iteration;
guint activity_dir : 1;
guint activity_mode : 1;
{
GtkProgressBar *pbar = GTK_PROGRESS_BAR (widget);
gint64 frame_time;
- gdouble iteration, pulse_iterations, current_iterations, fraction;
+ double iteration, pulse_iterations, current_iterations, fraction;
if (pbar->pulse2 == 0 && pbar->pulse1 == 0)
return G_SOURCE_CONTINUE;
*/
void
gtk_progress_bar_set_fraction (GtkProgressBar *pbar,
- gdouble fraction)
+ double fraction)
{
g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar));
*/
void
gtk_progress_bar_set_pulse_step (GtkProgressBar *pbar,
- gdouble fraction)
+ double fraction)
{
g_return_if_fail (GTK_IS_PROGRESS_BAR (pbar));
*
* Returns: a fraction from 0.0 to 1.0
*/
-gdouble
+double
gtk_progress_bar_get_fraction (GtkProgressBar *pbar)
{
g_return_val_if_fail (GTK_IS_PROGRESS_BAR (pbar), 0);
*
* Returns: a fraction from 0.0 to 1.0
*/
-gdouble
+double
gtk_progress_bar_get_pulse_step (GtkProgressBar *pbar)
{
g_return_val_if_fail (GTK_IS_PROGRESS_BAR (pbar), 0);
const char *text);
GDK_AVAILABLE_IN_ALL
void gtk_progress_bar_set_fraction (GtkProgressBar *pbar,
- gdouble fraction);
+ double fraction);
GDK_AVAILABLE_IN_ALL
void gtk_progress_bar_set_pulse_step (GtkProgressBar *pbar,
- gdouble fraction);
+ double fraction);
GDK_AVAILABLE_IN_ALL
void gtk_progress_bar_set_inverted (GtkProgressBar *pbar,
gboolean inverted);
GDK_AVAILABLE_IN_ALL
const char * gtk_progress_bar_get_text (GtkProgressBar *pbar);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_progress_bar_get_fraction (GtkProgressBar *pbar);
+double gtk_progress_bar_get_fraction (GtkProgressBar *pbar);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_progress_bar_get_pulse_step (GtkProgressBar *pbar);
+double gtk_progress_bar_get_pulse_step (GtkProgressBar *pbar);
GDK_AVAILABLE_IN_ALL
gboolean gtk_progress_bar_get_inverted (GtkProgressBar *pbar);
* the speed of animations. This can be useful for debugging.
*/
-static gdouble gtk_slowdown = 1.0;
+static double gtk_slowdown = 1.0;
void
-_gtk_set_slowdown (gdouble factor)
+_gtk_set_slowdown (double factor)
{
gtk_slowdown = factor;
}
-gdouble
+double
_gtk_get_slowdown (void)
{
return gtk_slowdown;
gtk_progress_tracker_start (GtkProgressTracker *tracker,
guint64 duration,
gint64 delay,
- gdouble iteration_count)
+ double iteration_count)
{
tracker->is_running = TRUE;
tracker->last_frame_time = 0;
tracker->duration = duration;
- tracker->iteration = - delay / (gdouble) MAX (duration, 1);
+ tracker->iteration = - delay / (double) MAX (duration, 1);
tracker->iteration_count = iteration_count;
}
gtk_progress_tracker_advance_frame (GtkProgressTracker *tracker,
guint64 frame_time)
{
- gdouble delta;
+ double delta;
if (!tracker->is_running)
return;
*
* Returns: The current iteration.
**/
-gdouble
+double
gtk_progress_tracker_get_iteration (GtkProgressTracker *tracker)
{
return tracker->is_running ? CLAMP (tracker->iteration, 0.0, tracker->iteration_count) : 1.0;
guint64
gtk_progress_tracker_get_iteration_cycle (GtkProgressTracker *tracker)
{
- gdouble iteration = gtk_progress_tracker_get_iteration (tracker);
+ double iteration = gtk_progress_tracker_get_iteration (tracker);
/* Some complexity here. We want an iteration of 0.0 to always map to 0 (start
* of the first iteration), but an iteration of 1.0 to also map to 0 (end of
*
* Returns: The progress value.
**/
-gdouble
+double
gtk_progress_tracker_get_progress (GtkProgressTracker *tracker,
gboolean reversed)
{
- gdouble progress, iteration;
+ double progress, iteration;
guint64 iteration_cycle;
iteration = gtk_progress_tracker_get_iteration (tracker);
/* From clutter-easing.c, based on Robert Penner's
* infamous easing equations, MIT license.
*/
-static gdouble
-ease_out_cubic (gdouble t)
+static double
+ease_out_cubic (double t)
{
- gdouble p = t - 1;
+ double p = t - 1;
return p * p * p + 1;
}
*
* Returns: The eased progress value.
**/
-gdouble
+double
gtk_progress_tracker_get_ease_out_cubic (GtkProgressTracker *tracker,
gboolean reversed)
{
- gdouble progress = gtk_progress_tracker_get_progress (tracker, reversed);
+ double progress = gtk_progress_tracker_get_progress (tracker, reversed);
return ease_out_cubic (progress);
}
gboolean is_running;
guint64 last_frame_time;
guint64 duration;
- gdouble iteration;
- gdouble iteration_count;
+ double iteration;
+ double iteration_count;
};
void gtk_progress_tracker_init_copy (GtkProgressTracker *source,
void gtk_progress_tracker_start (GtkProgressTracker *tracker,
guint64 duration,
gint64 delay,
- gdouble iteration_count);
+ double iteration_count);
void gtk_progress_tracker_finish (GtkProgressTracker *tracker);
GtkProgressState gtk_progress_tracker_get_state (GtkProgressTracker *tracker);
-gdouble gtk_progress_tracker_get_iteration (GtkProgressTracker *tracker);
+double gtk_progress_tracker_get_iteration (GtkProgressTracker *tracker);
guint64 gtk_progress_tracker_get_iteration_cycle (GtkProgressTracker *tracker);
-gdouble gtk_progress_tracker_get_progress (GtkProgressTracker *tracker,
+double gtk_progress_tracker_get_progress (GtkProgressTracker *tracker,
gboolean reverse);
-gdouble gtk_progress_tracker_get_ease_out_cubic (GtkProgressTracker *tracker,
+double gtk_progress_tracker_get_ease_out_cubic (GtkProgressTracker *tracker,
gboolean reverse);
G_END_DECLS
GtkOrientation orientation;
- gdouble fill_level;
- gdouble *marks;
+ double fill_level;
+ double *marks;
int *mark_pos;
int n_marks;
static void gtk_range_click_gesture_pressed (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkRange *range);
static void gtk_range_click_gesture_released (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkRange *range);
static void gtk_range_drag_gesture_begin (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkRange *range);
static void gtk_range_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkRange *range);
static void gtk_range_long_press_gesture_pressed (GtkGestureLongPress *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkRange *range);
/* Internals */
static void gtk_range_compute_slider_position (GtkRange *range,
- gdouble adjustment_value,
+ double adjustment_value,
GdkRectangle *slider_rect);
static gboolean gtk_range_scroll (GtkRange *range,
GtkScrollType scroll);
static void gtk_range_remove_step_timer (GtkRange *range);
static gboolean gtk_range_real_change_value (GtkRange *range,
GtkScrollType scroll,
- gdouble value);
+ double value);
static gboolean gtk_range_key_controller_key_pressed (GtkEventControllerKey *controller,
guint keyval,
guint keycode,
GtkSnapshot *snapshot);
static gboolean gtk_range_scroll_controller_scroll (GtkEventControllerScroll *scroll,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkRange *range);
G_DEFINE_TYPE_WITH_CODE (GtkRange, gtk_range, GTK_TYPE_WIDGET,
**/
void
gtk_range_set_increments (GtkRange *range,
- gdouble step,
- gdouble page)
+ double step,
+ double page)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
GtkAdjustment *adjustment;
**/
void
gtk_range_set_range (GtkRange *range,
- gdouble min,
- gdouble max)
+ double min,
+ double max)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
GtkAdjustment *adjustment;
- gdouble value;
+ double value;
g_return_if_fail (GTK_IS_RANGE (range));
g_return_if_fail (min <= max);
**/
void
gtk_range_set_value (GtkRange *range,
- gdouble value)
+ double value)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
*
* Returns: current value of the range.
**/
-gdouble
+double
gtk_range_get_value (GtkRange *range)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
**/
void
gtk_range_set_fill_level (GtkRange *range,
- gdouble fill_level)
+ double fill_level)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
*
* Returns: The current fill level
**/
-gdouble
+double
gtk_range_get_fill_level (GtkRange *range)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
return GTK_SCROLL_NONE;
}
-static gdouble
+static double
coord_to_value (GtkRange *range,
- gdouble coord)
+ double coord)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
- gdouble frac;
- gdouble value;
+ double frac;
+ double value;
int trough_length;
int slider_length;
graphene_rect_t slider_bounds;
static void
gtk_range_long_press_gesture_pressed (GtkGestureLongPress *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkRange *range)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
static void
gtk_range_click_gesture_pressed (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkRange *range)
{
GtkWidget *widget = GTK_WIDGET (range);
{
/* jump by pages */
GtkScrollType scroll;
- gdouble click_value;
+ double click_value;
click_value = coord_to_value (range,
priv->orientation == GTK_ORIENTATION_VERTICAL ?
button == GDK_BUTTON_SECONDARY)
{
/* autoscroll */
- gdouble click_value;
+ double click_value;
click_value = coord_to_value (range,
priv->orientation == GTK_ORIENTATION_VERTICAL ?
static void
gtk_range_click_gesture_released (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkRange *range)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
graphene_rect_t trough_bounds;
- gdouble delta;
- gdouble c;
- gdouble new_value;
+ double delta;
+ double c;
+ double new_value;
gboolean handled;
- gdouble next_value;
- gdouble mark_value;
- gdouble mark_delta;
- gdouble zoom;
+ double next_value;
+ double mark_value;
+ double mark_delta;
+ double zoom;
int i;
double x, y;
GtkRange *range = GTK_RANGE (data);
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
GtkAdjustment *adj = priv->adjustment;
- gdouble increment;
- gdouble value;
+ double increment;
+ double value;
gboolean handled;
- gdouble step, page;
+ double step, page;
step = gtk_adjustment_get_step_increment (adj);
page = gtk_adjustment_get_page_increment (adj);
case GTK_SCROLL_START:
case GTK_SCROLL_END:
{
- gdouble x, y;
- gdouble distance, t;
+ double x, y;
+ double distance, t;
/* Vary scrolling speed from slow (ie step) to fast (2 * page),
* based on the distance of the pointer from the widget. We start
static gboolean
gtk_range_scroll_controller_scroll (GtkEventControllerScroll *scroll,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkRange *range)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
- gdouble scroll_unit, delta;
+ double scroll_unit, delta;
gboolean handled;
GtkOrientation move_orientation;
static void
gtk_range_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkRange *range)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
- gdouble start_x, start_y;
+ double start_x, start_y;
if (priv->grab_location == priv->slider_widget)
{
static void
gtk_range_drag_gesture_begin (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkRange *range)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
static void
apply_marks (GtkRange *range,
- gdouble oldval,
- gdouble *newval)
+ double oldval,
+ double *newval)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
int i;
- gdouble mark;
+ double mark;
for (i = 0; i < priv->n_marks; i++)
{
step_back (GtkRange *range)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
- gdouble newval;
+ double newval;
gboolean handled;
newval = gtk_adjustment_get_value (priv->adjustment) - gtk_adjustment_get_step_increment (priv->adjustment);
step_forward (GtkRange *range)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
- gdouble newval;
+ double newval;
gboolean handled;
newval = gtk_adjustment_get_value (priv->adjustment) + gtk_adjustment_get_step_increment (priv->adjustment);
page_back (GtkRange *range)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
- gdouble newval;
+ double newval;
gboolean handled;
newval = gtk_adjustment_get_value (priv->adjustment) - gtk_adjustment_get_page_increment (priv->adjustment);
page_forward (GtkRange *range)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
- gdouble newval;
+ double newval;
gboolean handled;
newval = gtk_adjustment_get_value (priv->adjustment) + gtk_adjustment_get_page_increment (priv->adjustment);
scroll_end (GtkRange *range)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
- gdouble newval;
+ double newval;
gboolean handled;
newval = gtk_adjustment_get_upper (priv->adjustment) - gtk_adjustment_get_page_size (priv->adjustment);
GtkScrollType scroll)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
- gdouble old_value = gtk_adjustment_get_value (priv->adjustment);
+ double old_value = gtk_adjustment_get_value (priv->adjustment);
switch (scroll)
{
static void
gtk_range_compute_slider_position (GtkRange *range,
- gdouble adjustment_value,
+ double adjustment_value,
GdkRectangle *slider_rect)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
static gboolean
gtk_range_real_change_value (GtkRange *range,
GtkScrollType scroll,
- gdouble value)
+ double value)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
if (priv->round_digits >= 0)
{
- gdouble power;
+ double power;
int i;
i = priv->round_digits;
void
_gtk_range_set_stop_values (GtkRange *range,
- gdouble *values,
+ double *values,
int n_values)
{
GtkRangePrivate *priv = gtk_range_get_instance_private (range);
int i;
g_free (priv->marks);
- priv->marks = g_new (gdouble, n_values);
+ priv->marks = g_new (double, n_values);
g_free (priv->mark_pos);
priv->mark_pos = g_new (int, n_values);
void (* value_changed) (GtkRange *range);
void (* adjust_bounds) (GtkRange *range,
- gdouble new_value);
+ double new_value);
/* action signals for keybindings */
void (* move_slider) (GtkRange *range,
gboolean (* change_value) (GtkRange *range,
GtkScrollType scroll,
- gdouble new_value);
+ double new_value);
/*< private > */
GDK_AVAILABLE_IN_ALL
void gtk_range_set_increments (GtkRange *range,
- gdouble step,
- gdouble page);
+ double step,
+ double page);
GDK_AVAILABLE_IN_ALL
void gtk_range_set_range (GtkRange *range,
- gdouble min,
- gdouble max);
+ double min,
+ double max);
GDK_AVAILABLE_IN_ALL
void gtk_range_set_value (GtkRange *range,
- gdouble value);
+ double value);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_range_get_value (GtkRange *range);
+double gtk_range_get_value (GtkRange *range);
GDK_AVAILABLE_IN_ALL
void gtk_range_set_show_fill_level (GtkRange *range,
gboolean gtk_range_get_restrict_to_fill_level (GtkRange *range);
GDK_AVAILABLE_IN_ALL
void gtk_range_set_fill_level (GtkRange *range,
- gdouble fill_level);
+ double fill_level);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_range_get_fill_level (GtkRange *range);
+double gtk_range_get_fill_level (GtkRange *range);
GDK_AVAILABLE_IN_ALL
void gtk_range_set_round_digits (GtkRange *range,
int round_digits);
gboolean has_origin);
gboolean _gtk_range_get_has_origin (GtkRange *range);
void _gtk_range_set_stop_values (GtkRange *range,
- gdouble *values,
+ double *values,
int n_values);
int _gtk_range_get_stop_positions (GtkRange *range,
int **values);
static void
gtk_do_render_icon (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height)
+ double x,
+ double y,
+ double width,
+ double height)
{
GtkSnapshot *snapshot;
GskRenderNode *node;
void
gtk_render_check (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height)
+ double x,
+ double y,
+ double width,
+ double height)
{
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (cr != NULL);
void
gtk_render_option (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height)
+ double x,
+ double y,
+ double width,
+ double height)
{
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (cr != NULL);
void
gtk_render_arrow (GtkStyleContext *context,
cairo_t *cr,
- gdouble angle,
- gdouble x,
- gdouble y,
- gdouble size)
+ double angle,
+ double x,
+ double y,
+ double size)
{
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (cr != NULL);
void
gtk_render_background (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height)
+ double x,
+ double y,
+ double width,
+ double height)
{
GtkSnapshot *snapshot;
GskRenderNode *node;
void
gtk_render_frame (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height)
+ double x,
+ double y,
+ double width,
+ double height)
{
GtkSnapshot *snapshot;
GskRenderNode *node;
void
gtk_render_expander (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height)
+ double x,
+ double y,
+ double width,
+ double height)
{
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (cr != NULL);
void
gtk_render_focus (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height)
+ double x,
+ double y,
+ double width,
+ double height)
{
GtkSnapshot *snapshot;
GskRenderNode *node;
void
gtk_render_layout (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
PangoLayout *layout)
{
GtkSnapshot *snapshot;
static void
gtk_do_render_line (GtkStyleContext *context,
cairo_t *cr,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1)
+ double x0,
+ double y0,
+ double x1,
+ double y1)
{
const GdkRGBA *color;
void
gtk_render_line (GtkStyleContext *context,
cairo_t *cr,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1)
+ double x0,
+ double y0,
+ double x1,
+ double y1)
{
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (cr != NULL);
void
gtk_render_handle (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height)
+ double x,
+ double y,
+ double width,
+ double height)
{
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (cr != NULL);
void
gtk_render_activity (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height)
+ double x,
+ double y,
+ double width,
+ double height)
{
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
g_return_if_fail (cr != NULL);
gtk_render_icon (GtkStyleContext *context,
cairo_t *cr,
GdkTexture *texture,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GtkSnapshot *snapshot;
GskRenderNode *node;
GDK_AVAILABLE_IN_ALL
void gtk_render_check (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height);
+ double x,
+ double y,
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
void gtk_render_option (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height);
+ double x,
+ double y,
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
void gtk_render_arrow (GtkStyleContext *context,
cairo_t *cr,
- gdouble angle,
- gdouble x,
- gdouble y,
- gdouble size);
+ double angle,
+ double x,
+ double y,
+ double size);
GDK_AVAILABLE_IN_ALL
void gtk_render_background (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height);
+ double x,
+ double y,
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
void gtk_render_frame (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height);
+ double x,
+ double y,
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
void gtk_render_expander (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height);
+ double x,
+ double y,
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
void gtk_render_focus (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height);
+ double x,
+ double y,
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
void gtk_render_layout (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
PangoLayout *layout);
GDK_AVAILABLE_IN_ALL
void gtk_render_line (GtkStyleContext *context,
cairo_t *cr,
- gdouble x0,
- gdouble y0,
- gdouble x1,
- gdouble y1);
+ double x0,
+ double y0,
+ double x1,
+ double y1);
GDK_AVAILABLE_IN_ALL
void gtk_render_slider (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height,
+ double x,
+ double y,
+ double width,
+ double height,
GtkOrientation orientation);
GDK_AVAILABLE_IN_ALL
void gtk_render_handle (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height);
+ double x,
+ double y,
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
void gtk_render_activity (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height);
+ double x,
+ double y,
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
void gtk_render_icon (GtkStyleContext *context,
cairo_t *cr,
GdkTexture *texture,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
G_END_DECLS
#endif /* __GTK_RENDER_H__ */
static void
color_shade (const GdkRGBA *color,
- gdouble factor,
+ double factor,
GdkRGBA *color_return)
{
GtkHSLA hsla;
GtkRevealerTransitionType transition_type;
guint transition_duration;
- gdouble current_pos;
- gdouble source_pos;
- gdouble target_pos;
+ double current_pos;
+ double source_pos;
+ double target_pos;
guint tick_id;
GtkProgressTracker tracker;
int *natural_baseline);
static void gtk_revealer_set_position (GtkRevealer *revealer,
- gdouble pos);
+ double pos);
static void gtk_revealer_buildable_iface_init (GtkBuildableIface *iface);
static void
gtk_revealer_set_position (GtkRevealer *revealer,
- gdouble pos)
+ double pos)
{
GtkRevealerPrivate *priv = gtk_revealer_get_instance_private (revealer);
gboolean new_visible;
{
GtkRevealer *revealer = GTK_REVEALER (widget);
GtkRevealerPrivate *priv = gtk_revealer_get_instance_private (revealer);
- gdouble ease;
+ double ease;
gtk_progress_tracker_advance_frame (&priv->tracker,
gdk_frame_clock_get_frame_time (frame_clock));
static void
gtk_revealer_start_animation (GtkRevealer *revealer,
- gdouble target)
+ double target)
{
GtkRevealerPrivate *priv = gtk_revealer_get_instance_private (revealer);
GtkWidget *widget = GTK_WIDGET (revealer);
static void
gtk_rounded_box_clamp_border_radius (GskRoundedRect *box)
{
- gdouble factor = 1.0;
- gdouble corners;
+ double factor = 1.0;
+ double corners;
corners = box->corner[GSK_CORNER_TOP_LEFT].width + box->corner[GSK_CORNER_TOP_RIGHT].width;
if (corners != 0)
struct _GtkScaleMark
{
- gdouble value;
+ double value;
int stop_position;
char *markup;
GtkWidget *label_widget;
const char *tagname,
gpointer user_data);
static char * gtk_scale_format_value (GtkScale *scale,
- gdouble value);
+ double value);
G_DEFINE_TYPE_WITH_CODE (GtkScale, gtk_scale, GTK_TYPE_RANGE,
GtkScaleMark *mark;
GSList *m;
int i, n;
- gdouble *values;
+ double *values;
priv->marks = g_slist_sort_with_data (priv->marks,
compare_marks,
GINT_TO_POINTER (gtk_range_get_inverted (GTK_RANGE (scale))));
n = g_slist_length (priv->marks);
- values = g_new (gdouble, n);
+ values = g_new (double, n);
for (m = priv->marks, i = 0; m; m = m->next, i++)
{
mark = m->data;
*/
GtkWidget *
gtk_scale_new_with_range (GtkOrientation orientation,
- gdouble min,
- gdouble max,
- gdouble step)
+ double min,
+ double max,
+ double step)
{
GtkAdjustment *adj;
int digits;
*/
void
gtk_scale_add_mark (GtkScale *scale,
- gdouble value,
+ double value,
GtkPositionType position,
const char *markup)
{
GtkScalePrivate *priv = gtk_scale_get_instance_private (scale);
GtkScaleMark *mark;
GSList *m;
- gdouble *values;
+ double *values;
int n, i;
GtkWidget *marks_widget;
}
n = g_slist_length (priv->marks);
- values = g_new (gdouble, n);
+ values = g_new (double, n);
for (m = priv->marks, i = 0; m; m = m->next, i++)
{
mark = m->data;
typedef struct
{
- gdouble value;
+ double value;
GtkPositionType position;
GString *markup;
char *context;
else if (strcmp (element_name, "mark") == 0)
{
const char *value_str;
- gdouble value = 0;
+ double value = 0;
const char *position_str = NULL;
GtkPositionType position = GTK_POS_BOTTOM;
const char *msg_context = NULL;
GtkAdjustment *adjustment);
GDK_AVAILABLE_IN_ALL
GtkWidget * gtk_scale_new_with_range (GtkOrientation orientation,
- gdouble min,
- gdouble max,
- gdouble step);
+ double min,
+ double max,
+ double step);
GDK_AVAILABLE_IN_ALL
void gtk_scale_set_digits (GtkScale *scale,
int digits);
GDK_AVAILABLE_IN_ALL
void gtk_scale_add_mark (GtkScale *scale,
- gdouble value,
+ double value,
GtkPositionType position,
const char *markup);
GDK_AVAILABLE_IN_ALL
gpointer user_data);
static gboolean gtk_scale_button_scroll_controller_scroll (GtkEventControllerScroll *scroll,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkScaleButton *button);
G_DEFINE_TYPE_WITH_CODE (GtkScaleButton, gtk_scale_button, GTK_TYPE_WIDGET,
* Returns: a new #GtkScaleButton
*/
GtkWidget *
-gtk_scale_button_new (gdouble min,
- gdouble max,
- gdouble step,
+gtk_scale_button_new (double min,
+ double max,
+ double step,
const char **icons)
{
GtkScaleButton *button;
*
* Returns: current value of the scale button
*/
-gdouble
+double
gtk_scale_button_get_value (GtkScaleButton * button)
{
GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button);
*/
void
gtk_scale_button_set_value (GtkScaleButton *button,
- gdouble value)
+ double value)
{
GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button);
static gboolean
gtk_scale_button_scroll_controller_scroll (GtkEventControllerScroll *scroll,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkScaleButton *button)
{
GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button);
GtkAdjustment *adjustment;
- gdouble d;
+ double d;
adjustment = priv->adjustment;
GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button);
GtkAdjustment *adjustment = priv->adjustment;
gboolean can_continue = TRUE;
- gdouble val;
+ double val;
val = gtk_scale_button_get_value (button);
{
GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button);
GtkAdjustment *adjustment;
- gdouble value;
+ double value;
const char *name;
guint num_icons;
/* The 2-icons special case */
if (num_icons == 2)
{
- gdouble limit;
+ double limit;
limit = (gtk_adjustment_get_upper (adjustment) - gtk_adjustment_get_lower (adjustment)) / 2 + gtk_adjustment_get_lower (adjustment);
if (value < limit)
}
else
{
- gdouble step;
+ double step;
guint i;
step = (gtk_adjustment_get_upper (adjustment) - gtk_adjustment_get_lower (adjustment)) / (num_icons - 2); i = (guint) ((value - gtk_adjustment_get_lower (adjustment)) / step) + 2;
{
GtkScaleButton *button = user_data;
GtkScaleButtonPrivate *priv = gtk_scale_button_get_instance_private (button);
- gdouble value;
- gdouble upper, lower;
+ double value;
+ double upper, lower;
value = gtk_range_get_value (range);
upper = gtk_adjustment_get_upper (priv->adjustment);
/* signals */
void (* value_changed) (GtkScaleButton *button,
- gdouble value);
+ double value);
/*< private >*/
GDK_AVAILABLE_IN_ALL
GType gtk_scale_button_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
-GtkWidget * gtk_scale_button_new (gdouble min,
- gdouble max,
- gdouble step,
+GtkWidget * gtk_scale_button_new (double min,
+ double max,
+ double step,
const char **icons);
GDK_AVAILABLE_IN_ALL
void gtk_scale_button_set_icons (GtkScaleButton *button,
const char **icons);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_scale_button_get_value (GtkScaleButton *button);
+double gtk_scale_button_get_value (GtkScaleButton *button);
GDK_AVAILABLE_IN_ALL
void gtk_scale_button_set_value (GtkScaleButton *button,
- gdouble value);
+ double value);
GDK_AVAILABLE_IN_ALL
GtkAdjustment * gtk_scale_button_get_adjustment (GtkScaleButton *button);
GDK_AVAILABLE_IN_ALL
gint64 last_scroll_time;
guint conceil_timer;
- gdouble current_pos;
- gdouble source_pos;
- gdouble target_pos;
+ double current_pos;
+ double source_pos;
+ double target_pos;
GtkProgressTracker tracker;
guint tick_id;
guint over_timeout_id;
GtkGesture *drag_gesture;
GtkGesture *pan_gesture;
- gdouble drag_start_x;
- gdouble drag_start_y;
+ double drag_start_x;
+ double drag_start_y;
guint kinetic_scrolling : 1;
guint capture_button_press : 1;
guint deceleration_id;
- gdouble x_velocity;
- gdouble y_velocity;
+ double x_velocity;
+ double y_velocity;
- gdouble unclamped_hadj_value;
- gdouble unclamped_vadj_value;
+ double unclamped_hadj_value;
+ double unclamped_vadj_value;
} GtkScrolledWindowPrivate;
typedef struct
static void gtk_scrolled_window_realize (GtkWidget *widget);
static void _gtk_scrolled_window_set_adjustment_value (GtkScrolledWindow *scrolled_window,
GtkAdjustment *adjustment,
- gdouble value);
+ double value);
static void gtk_scrolled_window_cancel_deceleration (GtkScrolledWindow *scrolled_window);
static gboolean maybe_hide_indicator (gpointer data);
static void indicator_start_fade (Indicator *indicator,
- gdouble pos);
+ double pos);
static void indicator_set_over (Indicator *indicator,
gboolean over);
static void
scrolled_window_drag_begin_cb (GtkScrolledWindow *scrolled_window,
- gdouble start_x,
- gdouble start_y,
+ double start_x,
+ double start_y,
GtkGesture *gesture)
{
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
static void
scrolled_window_drag_update_cb (GtkScrolledWindow *scrolled_window,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkGesture *gesture)
{
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
GtkAdjustment *hadjustment;
GtkAdjustment *vadjustment;
- gdouble dx, dy;
+ double dx, dy;
gtk_scrolled_window_invalidate_overshoot (scrolled_window);
static void
gtk_scrolled_window_decelerate (GtkScrolledWindow *scrolled_window,
- gdouble x_velocity,
- gdouble y_velocity)
+ double x_velocity,
+ double y_velocity)
{
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
gboolean overshoot;
static void
scrolled_window_swipe_cb (GtkScrolledWindow *scrolled_window,
- gdouble x_velocity,
- gdouble y_velocity)
+ double x_velocity,
+ double y_velocity)
{
gtk_scrolled_window_decelerate (scrolled_window, -x_velocity, -y_velocity);
}
static void
scrolled_window_long_press_cb (GtkScrolledWindow *scrolled_window,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkGesture *gesture)
{
GdkEventSequence *sequence;
static gboolean
coords_close_to_indicator (GtkScrolledWindow *sw,
Indicator *indicator,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (sw);
graphene_rect_t indicator_bounds;
check_update_scrollbar_proximity (GtkScrolledWindow *sw,
Indicator *indicator,
GtkWidget *target,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (sw);
gboolean indicator_close, on_scrollbar, on_other_scrollbar;
return indicator_close;
}
-static gdouble
+static double
get_scroll_unit (GtkScrolledWindow *sw,
GtkOrientation orientation)
{
- gdouble scroll_unit;
+ double scroll_unit;
#ifndef GDK_WINDOWING_QUARTZ
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (sw);
GtkScrollbar *scrollbar;
GtkAdjustment *adj;
- gdouble page_size;
+ double page_size;
if (orientation == GTK_ORIENTATION_HORIZONTAL)
scrollbar = GTK_SCROLLBAR (priv->hscrollbar);
static gboolean
scroll_controller_scroll (GtkEventControllerScroll *scroll,
- gdouble delta_x,
- gdouble delta_y,
+ double delta_x,
+ double delta_y,
GtkScrolledWindow *scrolled_window)
{
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
if (shifted)
{
- gdouble delta;
+ double delta;
delta = delta_x;
delta_x = delta_y;
may_hscroll (scrolled_window))
{
GtkAdjustment *adj;
- gdouble new_value;
- gdouble scroll_unit;
+ double new_value;
+ double scroll_unit;
adj = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->hscrollbar));
scroll_unit = get_scroll_unit (scrolled_window, GTK_ORIENTATION_HORIZONTAL);
may_vscroll (scrolled_window))
{
GtkAdjustment *adj;
- gdouble new_value;
- gdouble scroll_unit;
+ double new_value;
+ double scroll_unit;
adj = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->vscrollbar));
scroll_unit = get_scroll_unit (scrolled_window, GTK_ORIENTATION_VERTICAL);
static void
scroll_controller_decelerate (GtkEventControllerScroll *scroll,
- gdouble initial_vel_x,
- gdouble initial_vel_y,
+ double initial_vel_x,
+ double initial_vel_y,
GtkScrolledWindow *scrolled_window)
{
- gdouble unit_x, unit_y;
+ double unit_x, unit_y;
gboolean shifted;
GdkModifierType state;
if (adjustment)
{
- gdouble value = gtk_adjustment_get_value (adjustment);
+ double value = gtk_adjustment_get_value (adjustment);
switch (scroll)
{
{
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
GtkAdjustment *vadjustment, *hadjustment;
- gdouble lower, upper, x, y;
+ double lower, upper, x, y;
/* Vertical overshoot */
vadjustment = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->vscrollbar));
static void
_gtk_scrolled_window_set_adjustment_value (GtkScrolledWindow *scrolled_window,
GtkAdjustment *adjustment,
- gdouble value)
+ double value)
{
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
- gdouble lower, upper, *prev_value;
+ double lower, upper, *prev_value;
GtkPositionType edge_pos;
gboolean vertical;
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
GtkAdjustment *hadjustment, *vadjustment;
gint64 current_time;
- gdouble position, elapsed;
+ double position, elapsed;
current_time = gdk_frame_clock_get_frame_time (frame_clock);
elapsed = (current_time - data->last_deceleration_time) / 1000000.0;
if (may_hscroll (scrolled_window))
{
- gdouble lower,upper;
+ double lower,upper;
GtkAdjustment *hadjustment;
hadjustment = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->hscrollbar));
if (may_vscroll (scrolled_window))
{
- gdouble lower,upper;
+ double lower,upper;
GtkAdjustment *vadjustment;
vadjustment = gtk_scrollbar_get_adjustment (GTK_SCROLLBAR (priv->vscrollbar));
GtkAdjustment *adjustment)
{
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
- gdouble value, lower, upper, page_size;
+ double value, lower, upper, page_size;
GtkPositionType edge_pos;
gboolean vertical;
static void
indicator_set_fade (Indicator *indicator,
- gdouble pos)
+ double pos)
{
gboolean visible, changed;
gpointer user_data)
{
Indicator *indicator = user_data;
- gdouble t;
+ double t;
gtk_progress_tracker_advance_frame (&indicator->tracker,
gdk_frame_clock_get_frame_time (frame_clock));
static void
indicator_start_fade (Indicator *indicator,
- gdouble target)
+ double target)
{
if (indicator->target_pos == target)
return;
case G_TYPE_DOUBLE:
{
- gdouble d_val;
+ double d_val;
g_value_init (&svalue.value, G_TYPE_DOUBLE);
d_val = g_key_file_get_double (keyfile, "Settings", key, &error);
static void gtk_shortcuts_section_pan_gesture_pan (GtkGesturePan *gesture,
GtkPanDirection direction,
- gdouble offset,
+ double offset,
GtkShortcutsSection *self);
static GtkBuildableIface *parent_buildable_iface;
static void
gtk_shortcuts_section_pan_gesture_pan (GtkGesturePan *gesture,
GtkPanDirection direction,
- gdouble offset,
+ double offset,
GtkShortcutsSection *self)
{
if (offset < 50)
void
gtk_snapshot_render_background (GtkSnapshot *snapshot,
GtkStyleContext *context,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height)
+ double x,
+ double y,
+ double width,
+ double height)
{
GtkCssBoxes boxes;
void
gtk_snapshot_render_frame (GtkSnapshot *snapshot,
GtkStyleContext *context,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height)
+ double x,
+ double y,
+ double width,
+ double height)
{
GtkCssBoxes boxes;
void
gtk_snapshot_render_focus (GtkSnapshot *snapshot,
GtkStyleContext *context,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height)
+ double x,
+ double y,
+ double width,
+ double height)
{
GtkCssBoxes boxes;
void
gtk_snapshot_render_layout (GtkSnapshot *snapshot,
GtkStyleContext *context,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
PangoLayout *layout)
{
const bool needs_translate = (x != 0 || y != 0);
GDK_AVAILABLE_IN_ALL
void gtk_snapshot_render_background (GtkSnapshot *snapshot,
GtkStyleContext *context,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height);
+ double x,
+ double y,
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
void gtk_snapshot_render_frame (GtkSnapshot *snapshot,
GtkStyleContext *context,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height);
+ double x,
+ double y,
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
void gtk_snapshot_render_focus (GtkSnapshot *snapshot,
GtkStyleContext *context,
- gdouble x,
- gdouble y,
- gdouble width,
- gdouble height);
+ double x,
+ double y,
+ double width,
+ double height);
GDK_AVAILABLE_IN_ALL
void gtk_snapshot_render_layout (GtkSnapshot *snapshot,
GtkStyleContext *context,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
PangoLayout *layout);
GDK_AVAILABLE_IN_ALL /* in gtkstylecontext.c */
void gtk_snapshot_render_insertion_cursor (GtkSnapshot *snapshot,
GtkStyleContext *context,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
PangoLayout *layout,
int index,
PangoDirection direction);
GtkSpinButtonUpdatePolicy update_policy;
- gdouble climb_rate;
- gdouble timer_step;
+ double climb_rate;
+ double timer_step;
int width_chars;
GtkWidgetClass parent_class;
int (*input) (GtkSpinButton *spin_button,
- gdouble *new_value);
+ double *new_value);
int (*output) (GtkSpinButton *spin_button);
void (*value_changed) (GtkSpinButton *spin_button);
static void gtk_spin_button_set_orientation (GtkSpinButton *spin_button,
GtkOrientation orientation);
static void gtk_spin_button_snap (GtkSpinButton *spin_button,
- gdouble val);
+ double val);
static void gtk_spin_button_insert_text (GtkEditable *editable,
const char *new_text,
int new_text_length,
int *position);
static void gtk_spin_button_real_spin (GtkSpinButton *spin_button,
- gdouble step);
+ double step);
static void gtk_spin_button_real_change_value (GtkSpinButton *spin,
GtkScrollType scroll);
static int gtk_spin_button_default_input (GtkSpinButton *spin_button,
- gdouble *new_val);
+ double *new_val);
static void gtk_spin_button_default_output (GtkSpinButton *spin_button);
static void gtk_spin_button_update_width_chars (GtkSpinButton *spin_button);
GdkEventSequence *sequence,
GtkSpinButton *spin_button)
{
- gdouble vel_y;
+ double vel_y;
gtk_gesture_swipe_get_velocity (GTK_GESTURE_SWIPE (gesture), NULL, &vel_y);
gtk_spin_button_real_spin (spin_button, -vel_y / 20);
static gboolean
scroll_controller_scroll (GtkEventControllerScroll *Scroll,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkWidget *widget)
{
GtkSpinButton *spin = GTK_SPIN_BUTTON (widget);
static void
start_spinning (GtkSpinButton *spin,
GtkWidget *click_child,
- gdouble step)
+ double step)
{
spin->click_child = click_child;
static char *
gtk_spin_button_format_for_value (GtkSpinButton *spin_button,
- gdouble value)
+ double value)
{
char *buf = g_strdup_printf ("%0.*f", spin_button->digits, value);
gtk_spin_button_real_change_value (GtkSpinButton *spin,
GtkScrollType scroll)
{
- gdouble old_value;
+ double old_value;
if (!gtk_editable_get_editable (GTK_EDITABLE (spin->entry)))
{
static void
gtk_spin_button_snap (GtkSpinButton *spin_button,
- gdouble val)
+ double val)
{
- gdouble inc;
- gdouble tmp;
+ double inc;
+ double tmp;
inc = gtk_adjustment_get_step_increment (spin_button->adjustment);
if (inc == 0)
static void
gtk_spin_button_real_spin (GtkSpinButton *spin_button,
- gdouble increment)
+ double increment)
{
GtkAdjustment *adjustment;
- gdouble new_value = 0.0;
+ double new_value = 0.0;
gboolean wrapped = FALSE;
adjustment = spin_button->adjustment;
static int
gtk_spin_button_default_input (GtkSpinButton *spin_button,
- gdouble *new_val)
+ double *new_val)
{
char *err = NULL;
const char *text = gtk_editable_get_text (GTK_EDITABLE (spin_button->entry));
void
gtk_spin_button_configure (GtkSpinButton *spin_button,
GtkAdjustment *adjustment,
- gdouble climb_rate,
+ double climb_rate,
guint digits)
{
g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button));
*/
GtkWidget *
gtk_spin_button_new (GtkAdjustment *adjustment,
- gdouble climb_rate,
+ double climb_rate,
guint digits)
{
GtkSpinButton *spin;
* Returns: The new spin button as a #GtkWidget
*/
GtkWidget *
-gtk_spin_button_new_with_range (gdouble min,
- gdouble max,
- gdouble step)
+gtk_spin_button_new_with_range (double min,
+ double max,
+ double step)
{
GtkAdjustment *adjustment;
GtkSpinButton *spin;
**/
void
gtk_spin_button_set_increments (GtkSpinButton *spin_button,
- gdouble step,
- gdouble page)
+ double step,
+ double page)
{
g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button));
**/
void
gtk_spin_button_get_increments (GtkSpinButton *spin_button,
- gdouble *step,
- gdouble *page)
+ double *step,
+ double *page)
{
g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button));
*/
void
gtk_spin_button_set_range (GtkSpinButton *spin_button,
- gdouble min,
- gdouble max)
+ double min,
+ double max)
{
GtkAdjustment *adjustment;
*/
void
gtk_spin_button_get_range (GtkSpinButton *spin_button,
- gdouble *min,
- gdouble *max)
+ double *min,
+ double *max)
{
g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button));
*
* Returns: the value of @spin_button
*/
-gdouble
+double
gtk_spin_button_get_value (GtkSpinButton *spin_button)
{
g_return_val_if_fail (GTK_IS_SPIN_BUTTON (spin_button), 0.0);
int
gtk_spin_button_get_value_as_int (GtkSpinButton *spin_button)
{
- gdouble val;
+ double val;
g_return_val_if_fail (GTK_IS_SPIN_BUTTON (spin_button), 0);
*/
void
gtk_spin_button_set_value (GtkSpinButton *spin_button,
- gdouble value)
+ double value)
{
g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button));
void
gtk_spin_button_spin (GtkSpinButton *spin_button,
GtkSpinType direction,
- gdouble increment)
+ double increment)
{
GtkAdjustment *adjustment;
- gdouble diff;
+ double diff;
g_return_if_fail (GTK_IS_SPIN_BUTTON (spin_button));
void
gtk_spin_button_update (GtkSpinButton *spin_button)
{
- gdouble val;
+ double val;
int error = 0;
int return_val;
GDK_AVAILABLE_IN_ALL
void gtk_spin_button_configure (GtkSpinButton *spin_button,
GtkAdjustment *adjustment,
- gdouble climb_rate,
+ double climb_rate,
guint digits);
GDK_AVAILABLE_IN_ALL
GtkWidget* gtk_spin_button_new (GtkAdjustment *adjustment,
- gdouble climb_rate,
+ double climb_rate,
guint digits);
GDK_AVAILABLE_IN_ALL
-GtkWidget* gtk_spin_button_new_with_range (gdouble min,
- gdouble max,
- gdouble step);
+GtkWidget* gtk_spin_button_new_with_range (double min,
+ double max,
+ double step);
GDK_AVAILABLE_IN_ALL
void gtk_spin_button_set_adjustment (GtkSpinButton *spin_button,
GDK_AVAILABLE_IN_ALL
void gtk_spin_button_set_increments (GtkSpinButton *spin_button,
- gdouble step,
- gdouble page);
+ double step,
+ double page);
GDK_AVAILABLE_IN_ALL
void gtk_spin_button_get_increments (GtkSpinButton *spin_button,
- gdouble *step,
- gdouble *page);
+ double *step,
+ double *page);
GDK_AVAILABLE_IN_ALL
void gtk_spin_button_set_range (GtkSpinButton *spin_button,
- gdouble min,
- gdouble max);
+ double min,
+ double max);
GDK_AVAILABLE_IN_ALL
void gtk_spin_button_get_range (GtkSpinButton *spin_button,
- gdouble *min,
- gdouble *max);
+ double *min,
+ double *max);
GDK_AVAILABLE_IN_ALL
-gdouble gtk_spin_button_get_value (GtkSpinButton *spin_button);
+double gtk_spin_button_get_value (GtkSpinButton *spin_button);
GDK_AVAILABLE_IN_ALL
int gtk_spin_button_get_value_as_int (GtkSpinButton *spin_button);
GDK_AVAILABLE_IN_ALL
void gtk_spin_button_set_value (GtkSpinButton *spin_button,
- gdouble value);
+ double value);
GDK_AVAILABLE_IN_ALL
void gtk_spin_button_set_update_policy (GtkSpinButton *spin_button,
GDK_AVAILABLE_IN_ALL
void gtk_spin_button_spin (GtkSpinButton *spin_button,
GtkSpinType direction,
- gdouble increment);
+ double increment);
GDK_AVAILABLE_IN_ALL
void gtk_spin_button_set_wrap (GtkSpinButton *spin_button,
{
GtkStack *stack = GTK_STACK (widget);
GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
- gdouble progress = gtk_progress_tracker_get_progress (&priv->tracker, FALSE);
+ double progress = gtk_progress_tracker_get_progress (&priv->tracker, FALSE);
gtk_snapshot_push_cross_fade (snapshot, progress);
{
if (orientation == GTK_ORIENTATION_VERTICAL && !priv->vhomogeneous)
{
- gdouble t = priv->interpolate_size ? gtk_progress_tracker_get_ease_out_cubic (&priv->tracker, FALSE) : 1.0;
+ double t = priv->interpolate_size ? gtk_progress_tracker_get_ease_out_cubic (&priv->tracker, FALSE) : 1.0;
*minimum = LERP (*minimum, priv->last_visible_widget_height, t);
*natural = LERP (*natural, priv->last_visible_widget_height, t);
}
if (orientation == GTK_ORIENTATION_HORIZONTAL && !priv->hhomogeneous)
{
- gdouble t = priv->interpolate_size ? gtk_progress_tracker_get_ease_out_cubic (&priv->tracker, FALSE) : 1.0;
+ double t = priv->interpolate_size ? gtk_progress_tracker_get_ease_out_cubic (&priv->tracker, FALSE) : 1.0;
*minimum = LERP (*minimum, priv->last_visible_widget_width, t);
*natural = LERP (*natural, priv->last_visible_widget_width, t);
}
static void
draw_insertion_cursor (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
- gdouble height,
+ double x,
+ double y,
+ double height,
float aspect_ratio,
gboolean is_primary,
PangoDirection direction,
}
static void
-get_insertion_cursor_bounds (gdouble height,
+get_insertion_cursor_bounds (double height,
float aspect_ratio,
PangoDirection direction,
gboolean draw_arrow,
static void
snapshot_insertion_cursor (GtkSnapshot *snapshot,
GtkStyleContext *context,
- gdouble height,
+ double height,
float aspect_ratio,
gboolean is_primary,
PangoDirection direction,
void
gtk_render_insertion_cursor (GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
PangoLayout *layout,
int index,
PangoDirection direction)
void
gtk_snapshot_render_insertion_cursor (GtkSnapshot *snapshot,
GtkStyleContext *context,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
PangoLayout *layout,
int index,
PangoDirection direction)
void gtk_render_insertion_cursor
(GtkStyleContext *context,
cairo_t *cr,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
PangoLayout *layout,
int index,
PangoDirection direction);
static void
gtk_switch_click_gesture_pressed (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkSwitch *self)
{
graphene_rect_t switch_bounds;
static void
gtk_switch_click_gesture_released (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkSwitch *self)
{
GdkEventSequence *sequence;
static void
gtk_switch_pan_gesture_pan (GtkGesturePan *gesture,
GtkPanDirection direction,
- gdouble offset,
+ double offset,
GtkSwitch *self)
{
GtkWidget *widget = GTK_WIDGET (self);
static void
gtk_switch_pan_gesture_drag_end (GtkGestureDrag *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkSwitch *self)
{
GdkEventSequence *sequence;
PangoFontDescription *font;
- gdouble font_scale;
+ double font_scale;
int left_margin;
int right_margin;
static void
handle_drag_begin (GtkGestureDrag *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkTextHandle *handle)
{
GtkWidget *widget;
static void
handle_drag_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkWidget *widget)
{
GtkTextHandle *handle = GTK_TEXT_HANDLE (widget);
- gdouble start_x, start_y;
+ double start_x, start_y;
int x, y;
gtk_gesture_drag_get_start_point (gesture, &start_x, &start_y);
static void
handle_drag_end (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTextHandle *handle)
{
g_signal_emit (handle, signals[DRAG_FINISHED], 0);
struct _GtkTextPendingScroll
{
GtkTextMark *mark;
- gdouble within_margin;
+ double within_margin;
gboolean use_align;
- gdouble xalign;
- gdouble yalign;
+ double xalign;
+ double yalign;
};
typedef enum
static void gtk_text_view_click_gesture_pressed (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkTextView *text_view);
static void gtk_text_view_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTextView *text_view);
static void gtk_text_view_drag_gesture_end (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTextView *text_view);
static gboolean gtk_text_view_key_controller_key_pressed (GtkEventControllerKey *controller,
static void cancel_pending_scroll (GtkTextView *text_view);
static void gtk_text_view_queue_scroll (GtkTextView *text_view,
GtkTextMark *mark,
- gdouble within_margin,
+ double within_margin,
gboolean use_align,
- gdouble xalign,
- gdouble yalign);
+ double xalign,
+ double yalign);
static gboolean gtk_text_view_flush_scroll (GtkTextView *text_view);
static void gtk_text_view_update_adjustments (GtkTextView *text_view);
#define LOWER_OFFSET_ANCHOR 0.2
static gboolean
-check_scroll (gdouble offset, GtkAdjustment *adjustment)
+check_scroll (double offset, GtkAdjustment *adjustment)
{
if ((offset > UPPER_OFFSET_ANCHOR &&
gtk_adjustment_get_value (adjustment) + gtk_adjustment_get_page_size (adjustment) < gtk_adjustment_get_upper (adjustment)) ||
GtkTextView *text_view;
GtkTextViewPrivate *priv;
GtkTextIter newplace;
- gdouble pointer_xoffset, pointer_yoffset;
+ double pointer_xoffset, pointer_yoffset;
text_view = GTK_TEXT_VIEW (data);
priv = text_view->priv;
gtk_text_buffer_move_mark (get_buffer (text_view), priv->dnd_mark, &newplace);
- pointer_xoffset = (gdouble) priv->dnd_x / text_window_get_width (priv->text_window);
- pointer_yoffset = (gdouble) priv->dnd_y / text_window_get_height (priv->text_window);
+ pointer_xoffset = (double) priv->dnd_x / text_window_get_width (priv->text_window);
+ pointer_yoffset = (double) priv->dnd_y / text_window_get_height (priv->text_window);
if (check_scroll (pointer_xoffset, priv->hadjustment) ||
check_scroll (pointer_yoffset, priv->vadjustment))
static gboolean
_gtk_text_view_scroll_to_iter (GtkTextView *text_view,
GtkTextIter *iter,
- gdouble within_margin,
+ double within_margin,
gboolean use_align,
- gdouble xalign,
- gdouble yalign,
+ double xalign,
+ double yalign,
gboolean with_border)
{
GtkTextViewPrivate *priv = text_view->priv;
gboolean
gtk_text_view_scroll_to_iter (GtkTextView *text_view,
GtkTextIter *iter,
- gdouble within_margin,
+ double within_margin,
gboolean use_align,
- gdouble xalign,
- gdouble yalign)
+ double xalign,
+ double yalign)
{
return _gtk_text_view_scroll_to_iter (text_view,
iter,
static void
gtk_text_view_queue_scroll (GtkTextView *text_view,
GtkTextMark *mark,
- gdouble within_margin,
+ double within_margin,
gboolean use_align,
- gdouble xalign,
- gdouble yalign)
+ double xalign,
+ double yalign)
{
GtkTextIter iter;
GtkTextPendingScroll *scroll;
void
gtk_text_view_scroll_to_mark (GtkTextView *text_view,
GtkTextMark *mark,
- gdouble within_margin,
+ double within_margin,
gboolean use_align,
- gdouble xalign,
- gdouble yalign)
+ double xalign,
+ double yalign)
{
g_return_if_fail (GTK_IS_TEXT_VIEW (text_view));
g_return_if_fail (GTK_IS_TEXT_MARK (mark));
GdkEventSequence *sequence;
GtkTextViewPrivate *priv;
int xcoord, ycoord;
- gdouble px, py;
+ double px, py;
priv = text_view->priv;
sequence =
static void
gtk_text_view_click_gesture_pressed (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkTextView *text_view)
{
GdkEventSequence *sequence;
if (!cursor_visible (text_view))
{
GtkScrollStep scroll_step;
- gdouble old_xpos, old_ypos;
+ double old_xpos, old_ypos;
switch (step)
{
int count)
{
GtkAdjustment *adjustment;
- gdouble increment;
+ double increment;
switch (step)
{
GtkTextIter old_insert;
GtkTextIter new_insert;
GtkTextIter anchor;
- gdouble newval;
- gdouble oldval;
+ double newval;
+ double oldval;
int y0, y1;
priv = text_view->priv;
GtkTextMark *insert_mark;
GtkTextIter old_insert;
GtkTextIter new_insert;
- gdouble newval;
- gdouble oldval;
+ double newval;
+ double oldval;
int y, height;
priv = text_view->priv;
int *x,
int *y)
{
- gdouble sx, sy, ox, oy;
+ double sx, sy, ox, oy;
if (!gtk_gesture_drag_get_start_point (gesture, &sx, &sy) ||
!gtk_gesture_drag_get_offset (gesture, &ox, &oy))
static void
gtk_text_view_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTextView *text_view)
{
int start_x, start_y, x, y;
static void
gtk_text_view_drag_gesture_end (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTextView *text_view)
{
gboolean is_touchscreen, clicked_in_selection;
{
GtkTextViewPrivate *priv;
int screen_width;
- gdouble old_value;
- gdouble new_value;
- gdouble new_upper;
+ double old_value;
+ double new_value;
+ double new_upper;
priv = text_view->priv;
g_object_set (priv->hadjustment,
"lower", 0.0,
"upper", new_upper,
- "page-size", (gdouble)screen_width,
+ "page-size", (double)screen_width,
"step-increment", screen_width * 0.1,
"page-increment", screen_width * 0.9,
NULL);
GtkTextIter first_para;
int screen_height;
int y;
- gdouble old_value;
- gdouble new_value;
- gdouble new_upper;
+ double old_value;
+ double new_value;
+ double new_upper;
priv = text_view->priv;
g_object_set (priv->vadjustment,
"lower", 0.0,
"upper", new_upper,
- "page-size", (gdouble)screen_height,
+ "page-size", (double)screen_height,
"step-increment", screen_height * 0.1,
"page-increment", screen_height * 0.9,
NULL);
GDK_AVAILABLE_IN_ALL
gboolean gtk_text_view_scroll_to_iter (GtkTextView *text_view,
GtkTextIter *iter,
- gdouble within_margin,
+ double within_margin,
gboolean use_align,
- gdouble xalign,
- gdouble yalign);
+ double xalign,
+ double yalign);
GDK_AVAILABLE_IN_ALL
void gtk_text_view_scroll_to_mark (GtkTextView *text_view,
GtkTextMark *mark,
- gdouble within_margin,
+ double within_margin,
gboolean use_align,
- gdouble xalign,
- gdouble yalign);
+ double xalign,
+ double yalign);
GDK_AVAILABLE_IN_ALL
void gtk_text_view_scroll_mark_onscreen (GtkTextView *text_view,
GtkTextMark *mark);
static void gtk_tooltip_handle_event_internal (GdkEventType event_type,
GdkSurface *surface,
GtkWidget *target_widget,
- gdouble dx,
- gdouble dy);
+ double dx,
+ double dy);
static GQuark quark_current_tooltip;
g_value_set_float (value, (float) list->data.v_float);
break;
case G_TYPE_DOUBLE:
- g_value_set_double (value, (gdouble) list->data.v_double);
+ g_value_set_double (value, (double) list->data.v_double);
break;
case G_TYPE_STRING:
g_value_set_string (value, (char *) list->data.v_pointer);
gint64 v_int64;
guint64 v_uint64;
float v_float;
- gdouble v_double;
+ double v_double;
gpointer v_pointer;
} data;
};
double y,
GtkTreeView *tree_view);
static gboolean gtk_tree_view_search_scroll_event (GtkWidget *entry,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkTreeView *tree_view);
static gboolean gtk_tree_view_search_key_pressed (GtkEventControllerKey *key,
guint keyval,
/* Gestures */
static void gtk_tree_view_column_click_gesture_pressed (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkTreeView *tree_view);
static void gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkTreeView *tree_view);
static void gtk_tree_view_click_gesture_released (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkTreeView *tree_view);
static void gtk_tree_view_column_drag_gesture_begin (GtkGestureDrag *gesture,
- gdouble start_x,
- gdouble start_y,
+ double start_x,
+ double start_y,
GtkTreeView *tree_view);
static void gtk_tree_view_column_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTreeView *tree_view);
static void gtk_tree_view_column_drag_gesture_end (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTreeView *tree_view);
static void gtk_tree_view_drag_gesture_begin (GtkGestureDrag *gesture,
- gdouble start_x,
- gdouble start_y,
+ double start_x,
+ double start_y,
GtkTreeView *tree_view);
static void gtk_tree_view_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTreeView *tree_view);
static void gtk_tree_view_drag_gesture_end (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTreeView *tree_view);
static void gtk_tree_view_motion_controller_enter (GtkEventControllerMotion *controller,
double x,
static void
gtk_tree_view_drag_gesture_begin (GtkGestureDrag *gesture,
- gdouble start_x,
- gdouble start_y,
+ double start_x,
+ double start_y,
GtkTreeView *tree_view)
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
static void
gtk_tree_view_column_click_gesture_pressed (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkTreeView *tree_view)
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
static void
gtk_tree_view_column_drag_gesture_begin (GtkGestureDrag *gesture,
- gdouble start_x,
- gdouble start_y,
+ double start_x,
+ double start_y,
GtkTreeView *tree_view)
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
static void
gtk_tree_view_column_drag_gesture_end (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTreeView *tree_view)
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
static void
gtk_tree_view_drag_gesture_end (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTreeView *tree_view)
{
gtk_tree_view_stop_rubber_band (tree_view);
static void
gtk_tree_view_click_gesture_released (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkTreeView *tree_view)
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
static gboolean
gtk_tree_view_motion_resize_column (GtkTreeView *tree_view,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
int new_width;
GtkTreeViewColumnReorder *reorder = NULL;
GdkEventSequence *sequence;
GList *list;
- gdouble x;
+ double x;
sequence = gtk_gesture_single_get_current_sequence
(GTK_GESTURE_SINGLE (priv->column_drag_gesture));
if (gtk_gesture_is_recognized (priv->drag_gesture))
{
GdkEventSequence *sequence;
- gdouble py;
+ double py;
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (priv->drag_gesture));
gtk_gesture_get_point (priv->drag_gesture, sequence, NULL, &py);
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
GdkEventSequence *sequence;
GdkRectangle visible_rect;
- gdouble x;
+ double x;
int offset;
sequence = gtk_gesture_single_get_current_sequence
static void
gtk_tree_view_motion_drag_column (GtkTreeView *tree_view,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
GtkTreeViewColumn *column = priv->drag_column;
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
GtkTreeRBTree *start_tree, *end_tree;
GtkTreeRBNode *start_node, *end_node;
- gdouble start_y, offset_y;
+ double start_y, offset_y;
int bin_y;
if (!gtk_gesture_is_active (priv->drag_gesture))
gtk_tree_view_update_rubber_band (GtkTreeView *tree_view)
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
- gdouble start_x, start_y, offset_x, offset_y, x, y;
+ double start_x, start_y, offset_x, offset_y, x, y;
int bin_x, bin_y;
if (!gtk_gesture_is_recognized (priv->drag_gesture))
GtkSnapshot *snapshot)
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
- gdouble start_x, start_y, offset_x, offset_y;
+ double start_x, start_y, offset_x, offset_y;
GdkRectangle rect;
GtkStyleContext *context;
int bin_x, bin_y;
static void
gtk_tree_view_column_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTreeView *tree_view)
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
- gdouble start_x, start_y, x, y;
+ double start_x, start_y, x, y;
GdkEventSequence *sequence;
sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
static void
gtk_tree_view_drag_gesture_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTreeView *tree_view)
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
{
GtkStyleContext *context;
GtkCssStyle *style;
- gdouble d;
+ double d;
int min_size;
context = gtk_widget_get_style_context (GTK_WIDGET (tree_view));
new_dy = MAX (0, new_dy);
priv->in_top_row_to_dy = TRUE;
- gtk_adjustment_set_value (priv->vadjustment, (gdouble)new_dy);
+ gtk_adjustment_set_value (priv->vadjustment, (double)new_dy);
priv->in_top_row_to_dy = FALSE;
}
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
GtkWidget *widget = GTK_WIDGET (tree_view);
- gdouble start_x, start_y, offset_x, offset_y;
+ double start_x, start_y, offset_x, offset_y;
TreeViewDragInfo *di;
GtkTreePath *path = NULL;
int button;
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
int cell_y;
int bin_x, bin_y;
- gdouble offset_into_row;
- gdouble fourth;
+ double offset_into_row;
+ double fourth;
GdkRectangle cell;
GtkTreeViewColumn *column = NULL;
GtkTreePath *tmp_path = NULL;
static gboolean
gtk_tree_view_search_scroll_event (GtkWidget *widget,
- gdouble dx,
- gdouble dy,
+ double dx,
+ double dy,
GtkTreeView *tree_view)
{
GtkTreeViewPrivate *priv = gtk_tree_view_get_instance_private (tree_view);
/* Button signal handlers */
static void column_button_drag_begin (GtkGestureDrag *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkTreeViewColumn *column);
static void column_button_drag_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTreeViewColumn *column);
static void gtk_tree_view_column_button_clicked (GtkWidget *widget,
static void
column_button_drag_begin (GtkGestureDrag *gesture,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkTreeViewColumn *column)
{
GtkTreeViewColumnPrivate *priv = column->priv;
static void
column_button_drag_update (GtkGestureDrag *gesture,
- gdouble offset_x,
- gdouble offset_y,
+ double offset_x,
+ double offset_y,
GtkTreeViewColumn *column)
{
GtkTreeViewColumnPrivate *priv = column->priv;
GtkScrollablePolicy scroll_policy;
GtkScrollablePolicy other_scroll_policy;
GtkOrientation other_orientation;
- gdouble upper, value;
+ double upper, value;
int viewport_size, other_viewport_size;
int view_width, view_height;
if (orientation == GTK_ORIENTATION_HORIZONTAL &&
_gtk_widget_get_direction (GTK_WIDGET (viewport)) == GTK_TEXT_DIR_RTL)
{
- gdouble dist = gtk_adjustment_get_upper (adjustment)
+ double dist = gtk_adjustment_get_upper (adjustment)
- value
- gtk_adjustment_get_page_size (adjustment);
value = upper - dist - viewport_size;
GtkTooltip *tooltip,
gpointer user_data);
static void cb_value_changed (GtkVolumeButton *button,
- gdouble value,
+ double value,
gpointer user_data);
G_DEFINE_TYPE (GtkVolumeButton, gtk_volume_button, GTK_TYPE_SCALE_BUTTON)
{
GtkScaleButton *scale_button = GTK_SCALE_BUTTON (button);
GtkAdjustment *adjustment;
- gdouble val;
+ double val;
char *str;
adjustment = gtk_scale_button_get_adjustment (scale_button);
}
static void
-cb_value_changed (GtkVolumeButton *button, gdouble value, gpointer user_data)
+cb_value_changed (GtkVolumeButton *button, double value, gpointer user_data)
{
gtk_widget_trigger_tooltip_query (GTK_WIDGET (button));
}
static gboolean
gtk_widget_real_contains (GtkWidget *widget,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GtkCssBoxes boxes;
{
GtkWidget *next_child, *parent;
GdkEvent *press;
- gdouble x, y;
+ double x, y;
graphene_point_t p;
if (event_widget == widget)
**/
gboolean
gtk_widget_contains (GtkWidget *widget,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE);
static GtkWidget *
gtk_widget_do_pick (GtkWidget *widget,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkPickFlags flags)
{
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
**/
GtkWidget *
gtk_widget_pick (GtkWidget *widget,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkPickFlags flags)
{
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
**/
void
gtk_widget_set_opacity (GtkWidget *widget,
- gdouble opacity)
+ double opacity)
{
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
guint8 alpha;
*
* Returns: the requested opacity for this widget.
**/
-gdouble
+double
gtk_widget_get_opacity (GtkWidget *widget)
{
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
GtkSnapshot *snapshot);
gboolean (* contains) (GtkWidget *widget,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
/*< private >*/
GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_contains (GtkWidget *widget,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
GDK_AVAILABLE_IN_ALL
GtkWidget * gtk_widget_pick (GtkWidget *widget,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkPickFlags flags);
GDK_AVAILABLE_IN_ALL
static void
click_gesture_pressed_cb (GtkGestureClick *gesture,
int n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkWindow *window)
{
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
GdkDevice *device,
GdkEventSequence *sequence,
GtkWidget *target,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
GtkPointerFocus *focus;
GdkDevice *device,
GdkEventSequence *sequence,
GtkWidget *target,
- gdouble x,
- gdouble y);
+ double x,
+ double y);
void gtk_window_set_pointer_focus_grab (GtkWindow *window,
GdkDevice *device,
GdkEventSequence *sequence,
static void
update_font_scale (GtkInspectorVisual *vis,
- gdouble factor,
+ double factor,
gboolean update_adjustment,
gboolean update_entry)
{
font_scale_adjustment_changed (GtkAdjustment *adjustment,
GtkInspectorVisual *vis)
{
- gdouble factor;
+ double factor;
factor = gtk_adjustment_get_value (adjustment);
update_font_scale (vis, factor, FALSE, TRUE);
font_scale_entry_activated (GtkEntry *entry,
GtkInspectorVisual *vis)
{
- gdouble factor;
+ double factor;
char *err = NULL;
factor = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err);
if (size == 0)
size = 32;
- gtk_adjustment_set_value (vis->scale_adjustment, (gdouble)size);
+ gtk_adjustment_set_value (vis->scale_adjustment, (double)size);
g_signal_connect (vis->cursor_size_adjustment, "value-changed",
G_CALLBACK (cursor_size_changed), vis);
}
#if defined (GDK_WINDOWING_X11)
if (GDK_IS_X11_DISPLAY (vis->display))
{
- gdouble scale;
+ double scale;
scale = gdk_monitor_get_scale_factor (gdk_x11_display_get_primary_monitor (vis->display));
gtk_adjustment_set_value (vis->scale_adjustment, scale);
static void
update_slowdown (GtkInspectorVisual *vis,
- gdouble slowdown,
+ double slowdown,
gboolean update_adjustment,
gboolean update_entry)
{
slowdown_adjustment_changed (GtkAdjustment *adjustment,
GtkInspectorVisual *vis)
{
- gdouble value = gtk_adjustment_get_value (adjustment);
- gdouble previous = CLAMP (log2 (_gtk_get_slowdown ()),
+ double value = gtk_adjustment_get_value (adjustment);
+ double previous = CLAMP (log2 (_gtk_get_slowdown ()),
gtk_adjustment_get_lower (adjustment),
gtk_adjustment_get_upper (adjustment));
slowdown_entry_activated (GtkEntry *entry,
GtkInspectorVisual *vis)
{
- gdouble slowdown;
+ double slowdown;
char *err = NULL;
slowdown = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err);
int height,
gpointer data)
{
- gdouble *scale = data;
+ double *scale = data;
width = MAX (*scale * width, 1);
height = MAX (*scale * height, 1);
GdkPixbuf *
_gdk_pixbuf_new_from_stream_scaled (GInputStream *stream,
const char *format,
- gdouble scale,
+ double scale,
GCancellable *cancellable,
GError **error)
{
GDestroyNotify dnotify);
static cairo_surface_t * cloudprint_printer_create_cairo_surface (GtkPrinter *printer,
GtkPrintSettings *settings,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GIOChannel *cache_io);
static void cloudprint_printer_request_details (GtkPrinter *printer);
TGOAAccount * t_goa_account_copy (TGOAAccount *account);
static cairo_surface_t *
cloudprint_printer_create_cairo_surface (GtkPrinter *printer,
GtkPrintSettings *settings,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GIOChannel *cache_io)
{
cairo_surface_t *surface;
GtkPrintSettings *settings,
GtkPageSetup *page_setup)
{
- gdouble scale;
+ double scale;
gtk_print_job_set_pages (print_job, gtk_print_settings_get_print_pages (settings));
gtk_print_job_set_page_ranges (print_job, NULL, 0);
static gboolean cups_request_default_printer (GtkPrintBackendCups *print_backend);
static gboolean cups_request_ppd (GtkPrinter *printer);
static gboolean cups_printer_get_hard_margins (GtkPrinter *printer,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right);
+ double *top,
+ double *bottom,
+ double *left,
+ double *right);
static gboolean cups_printer_get_hard_margins_for_paper_size (GtkPrinter *printer,
GtkPaperSize *paper_size,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right);
+ double *top,
+ double *bottom,
+ double *left,
+ double *right);
static GtkPrintCapabilities cups_printer_get_capabilities (GtkPrinter *printer);
static void set_option_from_settings (GtkPrinterOption *option,
GtkPrintSettings *setting);
GDestroyNotify dnotify);
static cairo_surface_t * cups_printer_create_cairo_surface (GtkPrinter *printer,
GtkPrintSettings *settings,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GIOChannel *cache_io);
static void gtk_print_backend_cups_set_password (GtkPrintBackend *backend,
static cairo_surface_t *
cups_printer_create_cairo_surface (GtkPrinter *printer,
GtkPrintSettings *settings,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GIOChannel *cache_io)
{
cairo_surface_t *surface;
static gboolean
cups_printer_get_hard_margins (GtkPrinter *printer,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right)
+ double *top,
+ double *bottom,
+ double *left,
+ double *right)
{
GtkPrinterCups *cups_printer = GTK_PRINTER_CUPS (printer);
ppd_file_t *ppd_file;
static gboolean
cups_printer_get_hard_margins_for_paper_size (GtkPrinter *printer,
GtkPaperSize *paper_size,
- gdouble *top,
- gdouble *bottom,
- gdouble *left,
- gdouble *right)
+ double *top,
+ double *bottom,
+ double *left,
+ double *right)
{
ppd_file_t *ppd_file;
ppd_size_t *size;
GDestroyNotify dnotify);
static cairo_surface_t * file_printer_create_cairo_surface (GtkPrinter *printer,
GtkPrintSettings *settings,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GIOChannel *cache_io);
static GList * file_printer_list_papers (GtkPrinter *printer);
static cairo_surface_t *
file_printer_create_cairo_surface (GtkPrinter *printer,
GtkPrintSettings *settings,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GIOChannel *cache_io)
{
cairo_surface_t *surface;
GtkPrintSettings *settings,
GtkPageSetup *page_setup)
{
- gdouble scale;
+ double scale;
GtkPrintPages pages;
GtkPageRange *ranges;
int n_ranges;
GtkPageSetup *page_setup);
static cairo_surface_t * lpr_printer_create_cairo_surface (GtkPrinter *printer,
GtkPrintSettings *settings,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GIOChannel *cache_io);
static void gtk_print_backend_lpr_print_stream (GtkPrintBackend *print_backend,
GtkPrintJob *job,
static cairo_surface_t *
lpr_printer_create_cairo_surface (GtkPrinter *printer,
GtkPrintSettings *settings,
- gdouble width,
- gdouble height,
+ double width,
+ double height,
GIOChannel *cache_io)
{
cairo_surface_t *surface;
static void
motion_cb (GtkEventControllerMotion *motion,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkWidget *widget)
{
float processing_ms = gtk_adjustment_get_value (adjustment);
static void
hsv_to_rgb (GdkRGBA *rgba,
- gdouble h,
- gdouble s,
- gdouble v)
+ double h,
+ double s,
+ double v)
{
- gdouble hue, saturation, value;
- gdouble f, p, q, t;
+ double hue, saturation, value;
+ double f, p, q, t;
rgba->alpha = 1.0;
static void
set_adjustment_to_fraction (GtkAdjustment *adjustment,
- gdouble fraction)
+ double fraction)
{
- gdouble upper = gtk_adjustment_get_upper (adjustment);
- gdouble lower = gtk_adjustment_get_lower (adjustment);
- gdouble page_size = gtk_adjustment_get_page_size (adjustment);
+ double upper = gtk_adjustment_get_upper (adjustment);
+ double lower = gtk_adjustment_get_lower (adjustment);
+ double page_size = gtk_adjustment_get_page_size (adjustment);
gtk_adjustment_set_value (adjustment,
(1 - fraction) * lower +
{
static gint64 start_time;
gint64 now = gdk_frame_clock_get_frame_time (frame_clock);
- gdouble elapsed;
+ double elapsed;
GtkAdjustment *hadjustment, *vadjustment;
if (start_time == 0)
{
GtkWidget *progress;
int current_page;
- gdouble value;
+ double value;
current_page = gtk_assistant_get_current_page (GTK_ASSISTANT (assistant));
progress = gtk_assistant_get_nth_page (GTK_ASSISTANT (assistant), current_page);
#define EPSILON 1e-10
-static gdouble
-double_normalize (gdouble n)
+static double
+double_normalize (double n)
{
if (fabs (1.0 - n) < EPSILON)
n = 1.0;
static void
spin_xalign_cb (GtkSpinButton *spin, GtkFrame *frame)
{
- gdouble xalign;
+ double xalign;
xalign = double_normalize (gtk_spin_button_get_value (spin));
gtk_frame_set_label_align (frame, xalign);
static void
toggle_orientation (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkGrid *grid)
{
o = 1 - o;
}
else
{
- gdouble fraction;
+ double fraction;
fraction = gtk_entry_get_progress_fraction (GTK_ENTRY (data));
{
GtkAdjustment *adjustment;
static char buf[6];
- gdouble hours;
- gdouble minutes;
+ double hours;
+ double minutes;
adjustment = gtk_spin_button_get_adjustment (spin_button);
hours = gtk_adjustment_get_value (adjustment) / 60.0;
static int
spin_button_month_input_func (GtkSpinButton *spin_button,
- gdouble *new_val)
+ double *new_val)
{
int i;
static const char *month[12] = { "January", "February", "March", "April",
*new_val = 0.0;
return GTK_INPUT_ERROR;
}
- *new_val = (gdouble) i;
+ *new_val = (double) i;
return TRUE;
}
spin_button_month_output_func (GtkSpinButton *spin_button)
{
GtkAdjustment *adjustment;
- gdouble value;
+ double value;
int i;
static const char *month[12] = { "January", "February", "March", "April",
"May", "June", "July", "August", "September",
static int
spin_button_hex_input_func (GtkSpinButton *spin_button,
- gdouble *new_val)
+ double *new_val)
{
const char *buf;
char *err;
- gdouble res;
+ double res;
buf = gtk_editable_get_text (GTK_EDITABLE (spin_button));
res = strtol(buf, &err, 16);
{
GtkAdjustment *adjustment;
static char buf[7];
- gdouble val;
+ double val;
adjustment = gtk_spin_button_get_adjustment (spin_button);
val = gtk_adjustment_get_value (adjustment);
static char *
reformat_value (GtkScale *scale,
- gdouble value)
+ double value)
{
return g_strdup_printf ("-->%0.*g<--",
gtk_scale_get_digits (scale), value);
progress_timeout (gpointer data)
{
ProgressData *pdata = data;
- gdouble new_val;
+ double new_val;
char *text;
if (pdata->activity)
static void
press_handler (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkWidget *widget)
{
GtkTreePath *path = NULL;
increase_level (gpointer data)
{
GtkLevelBar *bar = data;
- gdouble value;
+ double value;
value = gtk_level_bar_get_value (bar);
value += 0.1;
}
}
-gdouble marks[3] = { 0.0, 50.0, 100.0 };
-gdouble extra_marks[2] = { 20.0, 40.0 };
+double marks[3] = { 0.0, 50.0, 100.0 };
+double extra_marks[2] = { 20.0, 40.0 };
static void
extra (GtkToggleButton *button)
"<small>Right</small>"
};
- gdouble bath_marks[4] = { 0.0, 33.3, 66.6, 100.0 };
+ double bath_marks[4] = { 0.0, 33.3, 66.6, 100.0 };
const char *bath_labels[4] = {
"<span color='blue' size='small'>Cold</span>",
"<span size='small'>Baby bath</span>",
"<span color='Red' size='small'>Hot</span>"
};
- gdouble pos_marks[4] = { 0.0, 33.3, 66.6, 100.0 };
+ double pos_marks[4] = { 0.0, 33.3, 66.6, 100.0 };
const char *pos_labels[4] = { "Left", "Right", "Top", "Bottom" };
gboolean done = FALSE;
gpointer data)
{
GtkScrolledWindow *swindow = data;
- gdouble value;
+ double value;
value = gtk_spin_button_get_value (spin_button);
gtk_scrolled_window_set_min_content_width (swindow, (int)value);
gpointer data)
{
GtkScrolledWindow *swindow = data;
- gdouble value;
+ double value;
value = gtk_spin_button_get_value (spin_button);
gtk_scrolled_window_set_min_content_height (swindow, (int)value);
{
int i, k, d, items;
GTimer *timer;
- gdouble elapsed;
+ double elapsed;
int memused;
#ifdef HAVE_MALLINFO
int uordblks_before = 0;
static void
release_event (GtkGestureClick *gesture,
guint n_press,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkTreeView *tv)
{
GtkTreePath *path;
static void
value_changed (GtkWidget *button,
- gdouble volume,
+ double volume,
gpointer user_data)
{
g_message ("volume changed to %f", volume);
static void
motion_cb (GtkEventControllerMotion *controller,
- gdouble x,
- gdouble y,
+ double x,
+ double y,
GtkWidget *widget)
{
GtkFocusWidget *self = GTK_FOCUS_WIDGET (widget);
#include "variable.h"
typedef struct {
- gdouble angle;
+ double angle;
gint64 stream_time;
gint64 clock_time;
gint64 frame_counter;
GString *string)
{
AtkRange *range;
- gdouble value;
+ double value;
char *text;
value = 0.0;
test_performance_list (void)
{
GtkBuilder *builder;
- gdouble elapsed;
+ double elapsed;
GtkWidget *window;
GError *error = NULL;
test_a11y_performance_list (void)
{
GtkBuilder *builder;
- gdouble elapsed;
+ double elapsed;
GtkWidget *window;
GError *error = NULL;
int count_before;
test_performance_tree (void)
{
GtkBuilder *builder;
- gdouble elapsed;
+ double elapsed;
GtkWidget *window;
GError *error = NULL;
test_a11y_performance_tree (void)
{
GtkBuilder *builder;
- gdouble elapsed;
+ double elapsed;
GtkWidget *window;
GError *error = NULL;
int count_before;
NotifyData notify_data;
AtkObject *atk_object;
AtkValue *atk_value;
- gdouble value = 50;
- gdouble ret;
+ double value = 50;
+ double ret;
char *text;
atk_object = gtk_widget_get_accessible (widget);
"</interface>";
GObject *obj;
GtkAdjustment *adjustment;
- gdouble value;
+ double value;
builder = builder_new_from_string (buffer, -1, NULL);
obj = gtk_builder_get_object (builder, "spinbutton1");
static void
point_update (PointState *point,
GtkWidget *widget,
- gdouble x,
- gdouble y)
+ double x,
+ double y)
{
GdkDisplay *display;
GdkDevice *device;
} GestureData;
static void
-press_cb (GtkGesture *g, int n_press, gdouble x, gdouble y, gpointer data)
+press_cb (GtkGesture *g, int n_press, double x, double y, gpointer data)
{
GtkEventController *c = GTK_EVENT_CONTROLLER (g);
GdkEventSequence *sequence;
guint i;
NotifyData data;
gulong id;
- gdouble value;
- gdouble new_value;
+ double value;
+ double new_value;
int current_count;
- gdouble delta;
+ double delta;
data.name = pspec->name;
data.count = 0;